LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa timing swapping data Agilent Vacuum Controller XGS-600

Hello all,

 

I'm reading vacuum pressure off of an Agilent XGS-600. I'm connected through an USB-RS-232 converter. 

 

NI-VISA Interactive Control works. My VI for a single channel works. When I duplicate the write/read (ie the channel) and change the channel, making a request of each channel, one at a time, it works. Channel 1 reads and displays Channel 1 pressure. Channel 2 reads and displays Channel 2 pressure (NOCBL at this time which is perfect to not get values mixed up).

 

What I'm observing is that with both channels on at the same time, Channel 1 displays Channel 2 pressure and Channel 2 displays Channel 1 presure. They are both in Case Structures. If I set one channel to false and the other to true and manually toggle the boolean whilst the program is running, then I sample Channel 1 and it displays Channel 1, then Channel 2 and it displays Channel 2. When I then remove my boolean control and replace with a NOT and registers so it will toggle itself (add a clock for timing), it will fail to maintain and put 1 on 2 and 2 on 1, again.

 

I've tried several different layouts (ie all in one loop in a flat sequence, parallel while loops, etc etc) and messed with adding timing variables. Also tried different clear and othe VISA VIs. Nothing seems to be fixing this problem.

 

Not sure what to do next.

 

Ideas?

0 Kudos
Message 1 of 6
(3,893 Views)
What you need to do is attach the VI or an block diagram image as a snippet.
0 Kudos
Message 2 of 6
(3,880 Views)
0 Kudos
Message 3 of 6
(3,845 Views)
That's not a SNIPPET!

The sequence structure is not needed at all. You should use a common Boolean for the ChN selection so that if you disable a write, the read is also disabled. You also aren't sending a termination character with the writes. Pretty certain the instrument requires that with a serial connection.
0 Kudos
Message 4 of 6
(3,832 Views)

Like I said, I've tried several variations. The "snippet" I posted is tied to a large program so I copied and pasted the "snippet" into a seperate VI before going through many iterations. The posted one is untouched for the master VI.

I did one with the write/read tied together. I also did one where CH1 write/read tied together was true and CH2 write/read was false. Then when I clicked the single boolean control whilst running, CH1 went false and CH2 went true, everything tracked fine, but when I added an auto boolean feature (removing the boolean control) it went back to broke.

Per termination character, that was an issue earlier where I was getting an error. LabVIEW is actually sending the termination character in the background. Otherwise, yes, one would be needed (same for VISA Interactive Control).

Per the sequence structure, it is needed. The signals seem to get weird without it and with both channels running, it will only run CH1. Everytime and different design iteration, this has been constant. The two cannot run in series, they must be in the sequence structure, and there cannot bea shift register.

So, again, the issue is:

Any one channel works fine, but running two channels at once, the read from CH1 outputs to the CH2 display and the CH2 outputs to the CH1 display.

0 Kudos
Message 5 of 6
(3,824 Views)
You have NOT posted a snippet. Please look up the definition on the LabVIEW help.

No, a sequence structure is not at all needed. The VISA Resource and error wire provides all of the sequencing that you can ever need. They have to run sequentially but the sequence structure is redundant with the correct wiring. Endless discussions on using dataflow.

Your image does not show any configuration for the termination character with a write. The VISA Configure Serial Port only configures a read termination character.
0 Kudos
Message 6 of 6
(3,811 Views)