LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 or more GPIB devices getting a command sent to it sequentially?

2 or more GPIB devices getting a command sent to it sequentially, as in one device is getting a get temperature command continuously while the second device wants to start up and do the same. How can I do this in labview with both devices on the same BUS?

0 Kudos
Message 1 of 6
(1,986 Views)

Just make sure they all have different addresses and you should be able to talk to each on individually.

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 2 of 6
(1,966 Views)

so if I send a command to GPIB0::4 and also I send it to GPIB0::5, does labview or the gpib-usb-hs automatically wait for one to finish sending the command, and then send it to the next or do I have to program a delay or something like that?

0 Kudos
Message 3 of 6
(1,963 Views)

Since you are also expecting data back, you should probably make a non-reentrant VI to send the message and read back the response.  Then the VI will act as your semaphore/lock so that only one instrument will be allowed to talk at a time.


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 4 of 6
(1,950 Views)

thanks for the response.

this sounds good, yet I have no idea what a non-reentrant VI is.

Would you happen to have an example?

0 Kudos
Message 5 of 6
(1,948 Views)

Reentrancy is a property of each VI. The default is non-reentrant, meaning if 2 places try to call it at the same time, one will get it first and when it is done the second place will get it. You can enforce which one call gets run first by making use of dataflow. You can use shared clone if everywhere the VI is called the history has no impact. You can use preallocated clone if you want each place the VI is called to have its own memory space. So if you are using, for example, feedback nodes, the history will be kept intact for each specific call of the VI.

 

Capture.PNG

0 Kudos
Message 6 of 6
(1,943 Views)