Page 1 of 1

MIAC P18

Posted: Sun Oct 28, 2018 6:34 am
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 9898 times
As always your help is appreciated

Re: MIAC P18

Posted: Mon Oct 29, 2018 10:56 am
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

Re: MIAC P18

Posted: Mon Oct 29, 2018 2:42 pm
by QMESAR
Hi Ben.

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

Re: MIAC P18

Posted: Wed Oct 31, 2018 7:27 pm
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 9835 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 9835 times

Re: MIAC P18

Posted: Sat Nov 17, 2018 5:01 pm
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

Re: MIAC P18

Posted: Tue Feb 05, 2019 4:00 pm
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?

Re: MIAC P18

Posted: Tue Feb 05, 2019 5:04 pm
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

Re: MIAC P18

Posted: Tue Feb 05, 2019 5:25 pm
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.

Re: MIAC P18

Posted: Tue Feb 05, 2019 7:17 pm
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 .

Re: MIAC P18

Posted: Wed Feb 06, 2019 5:39 pm
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.