MIAC P18

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

MIAC P18

Post by QMESAR »

Hi Team.
I have a MIAC that control a Test Rig now for about 5 months and it is working really well however as the test needs grow the USB data communication between the laBVIEW Program and the MIAC grows as well and I have no run into an error that I can not receive more that 32bytes in labVIEW in one
USB transaction ,after hours of looking in my code I eventually opened up the Matrix labVIEW DLL call and I see some numbers links to 32 ,
Can you please advise if this is really the maximum transfer number of bytes and if so is it possible to make it 64 bytes at least
P1.jpg
P1.jpg (118.08 KiB) Viewed 9576 times
As always your help is appreciated

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC P18

Post by Benj »

Hello Peter,

The Embedded code seems to be set up for 64-byte packets. Changing those 32 to 64 in Labview might be all you have to do.

Setting up the slave endpoints in the component.
volatile unsigned char INPacket[64] IN_DATA_BUFFER_ADDRESS_TAG;
volatile unsigned char OUTPacket[64] OUT_DATA_BUFFER_ADDRESS_TAG;
Setting the USB transfer size in the USB CAL C code.
#define USBGEN_EP_SIZE 64

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MIAC P18

Post by QMESAR »

Hi Ben.

Thank you very much for the info, I will give it ago and report back!
much appreciated

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MIAC P18

Post by QMESAR »

Hi Ben.
I had time today to try out the above suggestions unfortunately with no Luck
:(
(1) If I set both parameters in the dll call to 64 then I am notable to send anything out from LV nothing works.

(2) if I set the outgoing parameter lengt back to 32 bytes and the incoming to 64 then I can send the original array to the MIAC I then see that I receive
the 36 bytes(just tries 36 need 64 at the end) send from MIAC to LV the incoming terminal of the dll call I wired to an indicator and it shows me the 36 bytes However every thing after the 32 bytes is always zero(0) .I think the MIAC USB component does not populate the bytes above 32 with data

I hope we can find a solution to this ,As always I appreciate your help and info.
:D
P1.jpg
P1.jpg (42.37 KiB) Viewed 9513 times
Please note the array length is not set corruptly here I only use the pic to show the indicators for the in and out length
P2.jpg
P2.jpg (53.42 KiB) Viewed 9513 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MIAC P18

Post by QMESAR »

Hi Team.
It has been some time with no comment from your side.
It seems it will not be possible to help on this one ,I understand that you are busy with the new update of V8.1 :D
No problem at all. :D

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC P18

Post by Benj »

Hi Peter,

I don't currently have a version of Labview to play with so you might have to play around with this. Was it working fine previously? What has changed to make it not work any more?

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MIAC P18

Post by QMESAR »

Ben this is all working fine and the product is wortking in the field however
I have to send several packets now because if the data lenght is more that 32 bytes you always only receive 32 bytes on the PC side

I have tried to change the dll settings as you suggestet before but that does not help althought the microside is setup by MM to do 64 bytes packets.
you will see I posted a dll screen printz set at 64 bytes :D
so now instead of sending 64bytes I send 32 and trhen again 32 for example .

Regards
Peter

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC P18

Post by Benj »

Hi Peter,

Does it make any difference if the outgoing is also set to 64. In your screenshot it shows you trying to read 64 but write 32 I believe. Probably won't make a difference but you never know :wink:

Otherwise you may have to live with 32 bytes for now until we have more time to investigate more thoroughly.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: MIAC P18

Post by QMESAR »

HI Ben.
It does not make any difference I have set both to 64 in the past, :D
It is no problem I can live it it for now, I made two packets and send in a state machine the packets!
However it would be nice and great if you guys can in future look at this .

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC P18

Post by Benj »

Ok thanks Peter, :D

I'll make a note so next time we have Labview fired up with a MIAC I can try and push the envelope.

Post Reply