LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about data flow

I used data flow to write and read values. The problem is, when I open Highlight Execution, the returned value from VISA Read is correct, when I close Highligh Execution, the returned value is wrong. 

 

I was wondering if it is when the Highlight Execution is closed, the program runs too fast, and doesn't follow the sequence of the structure (data flow). Because I need to manipulate the value from VISA read, so the returned value is very important. But if I open Highlight Execution, the program is too slow. 

Does anyone know how to fix this problem?

 

bb.png

0 Kudos
Message 1 of 5
(2,498 Views)

Highlight execution doesn't break dataflow.

 

If your program is running too fast, then you might need some delays sequenced in with the other items.  It looks to me like you are running a lot of VISA writes in a row.  Perhaps your device can't hanldle them at high speed.

Message 2 of 5
(2,489 Views)

If the VISA Read VIs read replies initiated by the preceding Write, you will need some delay right after the Write call. Depending on the device it may be 20-30 milliseconds, but it can be 200+ milliseconds. Sometimes you can find information in the device manual or just try what works best.

Message 3 of 5
(2,456 Views)

Instruments can be very slow at processing commands.  I highly recommend adding a delay after every VISA Write.  50ms tends to be a good wait for most instruments.  I have an oscilloscope that needs more like 500ms (depending on the command).


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
Message 4 of 5
(2,431 Views)

If it's SCPI compliant you can also make use of the *OPC? command which turns your command into a query.  That way your code only waits long enough for the equipment to reply before moving on.  It doesn't have to wait the maximum expected delay every time.  (Caveat: even if the equipment is SCPI compliant, you have to read the programmer's guide to tell you which commands support it.)

 

Saving a few hundred milliseconds doesn't seem like a lot until you have a test that runs for days and you are constantly talking to the equipment.  Sometimes you can shave HOURS off a test like that.  That becomes important if your UUT has a burn in spec.

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 5 of 5
(2,424 Views)