LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute a series command automatically

Solved!
Go to solution

Thanks. But it seems that this will not work for multiple I/O?

0 Kudos
Message 11 of 24
(1,448 Views)

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:

 

Wait after VISA Write.png

Feel free. Contact me for anything more,
    Pang

You too can be LabVIEW Awesome!
0 Kudos
Message 12 of 24
(1,441 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 13 of 24
(1,424 Views)

Here is an actual example of the way I write a series of commands to an instrument.

 

mmulti visa.PNG

 

mmulti visa2.PNG

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 14 of 24
(1,384 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 24
(1,370 Views)

@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.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 16 of 24
(1,361 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 17 of 24
(1,352 Views)

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!

0 Kudos
Message 18 of 24
(1,329 Views)

Half minute wait time? Smiley Surprised

0 Kudos
Message 19 of 24
(1,315 Views)

It would be a good time to upload the manual.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 20 of 24
(1,302 Views)