10-21-2016 07:58 PM
Thanks. But it seems that this will not work for multiple I/O?
10-21-2016 09:09 PM
Your timing may be off because the code is not enforcing the wait to occur after the VISA command. The wait function was floating in space, which means that there is no guarantee that it will occur before, during, or after the call to VISA write. Use the error cluster to enforce data flow:
10-22-2016 03:45 AM - edited 10-22-2016 03:45 AM
I think we'd better look at the manual. I don't think commands are being sent exactly correctly. Needing hardcoded waits almost always signals that there is an incomplete understanding of the sending and receiving of data. Unless the manually specifically states that you need to insert hardcoded waits, there's usually no need for them.
10-24-2016 12:19 PM - edited 10-24-2016 12:21 PM
Here is an actual example of the way I write a series of commands to an instrument.
10-24-2016 01:59 PM
I do the same as RTSLVU. As far was the wait inside of the loop, some instruments do not need the wait, others need 50ms, others 500ms. So do not be surprised is something does not work because you did not allow the instrument to do its thing before the next message comes in.
10-24-2016 02:28 PM
@crossrulz wrote:I do the same as RTSLVU. As far was the wait inside of the loop, some instruments do not need the wait, others need 50ms, others 500ms. So do not be surprised is something does not work because you did not allow the instrument to do its thing before the next message comes in.
Yeah, I had to add that 200mS because on the older Ci5000 units we have can't take it in any faster. I would get a "comand buffer overflow" error or something like that.
10-24-2016 03:02 PM
@RTSLVU wrote:Yeah, I had to add that 200mS because on the older Ci5000 units we have can't take it in any faster. I would get a "comand buffer overflow" error or something like that.
At least you got an error. I had an oscilloscope that would appear to not even process the command unless I had a 500ms wait between commands. Granted, I think it did actually do the command, but other things it was processing due to previous commands over-wrote the settings I gave it.
10-24-2016 08:44 PM
Thank you for everyone's help. I have evetually used QMC and state machine to address my question.
I did have to add 30000ms wait time for some command, it is just how my instrument work ...
Best to everyone!
10-25-2016 12:35 AM
Half minute wait time?
10-25-2016 08:24 AM
It would be a good time to upload the manual.