03-11-2019 09:15 AM
Hi,
I am using Arduino with labview and burning the program into arduino using makerhub linx. the problem I am facing is the delay in reading the input data from arduino to labview of about 10 seconds. looking forward for possible solutions.
Thanks
03-11-2019 09:38 AM
Hi kash,
the problem I am facing is the delay in reading the input data from arduino to labview of about 10 seconds. looking forward for possible solutions.
I guess the problem is in your software.
You need to debug your software to find and eliminate that problem.
03-11-2019 09:47 AM
Well without seeing your code all we can say is you are doing it wrong.
Beyond that your guess is as good as ours.
03-11-2019 10:02 AM
My guess is you are closing and reopening the reference between each read. This causes lots of extra delays and a better method is to open once, read many times in a loop, then close once. Just a guess though and as others said posting the code would help with that.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-11-2019 10:54 AM
Sounds like a timeout error to me.
But who would know without seeing any code posted.
03-11-2019 12:56 PM
Kind of fun to guess without source code 😉
But at 10 seconds, it's almost certainly a VISA Read timeout. Add a termchar to the end of your data stream from the Arduino. I can't recall if VISA Read's default timeout is 2 seconds or 10 seconds (and it may vary by device/driver? I'm not sure).
03-11-2019 10:58 PM
I am sharing the snapshot of the code. the problem i feel is with linx open serial which is taken time. the reason being, there is a delay in execution of the first sequence.
03-11-2019 11:29 PM
i think the delay is due to the initialisation of the linx. Now the problem is, I am also actuating the actuator via digital write through linx and due to delay in acquisition, the actuator does goes to the extreme position till it start acquiring the data.
03-12-2019 09:46 AM
@kashifsherwani wrote:
i think the delay is due to the initialisation of the linx.
I think you should show us your code so we can actually help you.
03-12-2019 10:55 PM
hi,
Please see the attached code. here i am using makerhub linx for the acquisition of data. To enter the sequence, it takes times.