Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication with device only happens every second time

I am trying to connect to a stimulator. First I perform an initial test by sending a "?" command. It sends me "!" back. Then I tell it to stimulate.

However, intial test only works onces and in the next run (restart vi), it doesn't. After that, it starts to work again. So it basically skips one run.

I've attached the code.

 

PS: I have a visual basic program that communicates with the device fine everytime.

0 Kudos
Message 1 of 2
(3,112 Views)
For one thing, you don't have your controls inside the event structure so you have to click the start button twice. Place the start button inside it's event and eliminate the case statement. It's not needed with the mechanical action you have. Do the same with the stop button and using a property node for the frequency input is really not necessary.
0 Kudos
Message 2 of 2
(3,108 Views)