Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview to control two ESP301 controllers

Hello All,

 

I have written labview code to control two ESP301 controllers simultaneously via USB using flat sequence structure. But when I run the VI, the initialize block in the first flat sequence frame generates an error :-1073807339 labVIEW error whereas the second frame runs without any error and could establish communication when the logic is the same. 

 

NOTE: both the controllers are connected via USB separately and both the controllers have the same controller address 1.   

0 Kudos
Message 1 of 5
(4,503 Views)

Where did you get the drivers from? I suspect that perhaps the driver doesn't like having multiple instances (e.g. if it's a non-thread safe DLL call) or both instances are trying to access the same resource (e.g. VISA Resource / COM port). The error code indicates a timeout - are both devices plugged in correctly with different COM ports? Are you using a suitable filter so it knows how to identify which instrument it's communicating with?

 

Also - don't forget to 'close' your references after your VI executes - the library you have should include a 'close' function which will free up the VISA resource for the next time it runs.

 

I would also recommend that you get rid of the flat sequence structure (use dataflow or build a state machine) because your block diagram is pretty large.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(4,500 Views)

I got the drivers from Newport website. The devices are connected through separate com ports. I did not have any filter to differentiate which controller I am communicating with as I thought putting in  different frames might solve the issue. Thanks for reminding about the close vi. I don't know why I keep forgetting Thanks for your advice.

 

Regards 

Sud 

0 Kudos
Message 3 of 5
(4,495 Views)
There isn't an input which specifies which instrument you are opening communication with (e.g. by COM port) - so probably something is going on inside the driver which might cause a conflict when talking to multiple instruments.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(4,492 Views)

Hello

 

Isn`t there a solution to control two ESP301 Models?

 

Greets

 

K.

0 Kudos
Message 5 of 5
(4,094 Views)