11-13-2014 03:44 PM
Hi,
I have developed a RS422 driver in LabVIEW while does basic operation like Initialize, Read, Write, Close etc. Later I used it as a packed library in TestStand scripts.
The issue is, when I try to read response for one of the command, I am able to observe it in the 6th iteration of read step, where I am supposed to read it for the first time.
Please suggest any ideas about what might be the reason.
Solved! Go to Solution.
11-14-2014 12:48 AM
You need to find out if response data is really coming that late after giving command or the VI that you have written is not able to capture the correct data.
If you have a RS 422 logger or bus analyser then it will be easy to analyse the cause.
Since you are able to read it on the 6th read step few questions :
Are you always able to read it on the 6th read only? If yes then probably the target UUT is responding slowly for this command or it is sending too many junk data which is read by first 5 reads. (depends on your read algorithm).
The read vi should be written such that it will be in a loop ( with some time out) until it gets the required data.The time out should be configurable.
Also before you send the command you should ensure that the read buffer is empty (flushed out).
Hope this helps.
Ravi
11-14-2014 08:01 AM
Thank you Ravi,
This helped me a lot, last suggestion worked out for me.
I cleared the buffer and able to get the expected output for a single read now. It might be because of the earlier operations in the script that causing the issue.
Thanks once again.
Phani