09-16-2015 02:33 PM
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?
09-16-2015 02:57 PM
09-17-2015 10:29 AM
Attached
09-17-2015 10:40 AM
09-17-2015 11:04 AM - edited 09-17-2015 11:26 AM
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.
09-17-2015 11:45 AM