PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble reading lines from SCXI-1160

Hello,
 
I have trouble reading the status of the lines of my SCXI-1160 relay boards. The relays operate a series of solenoid valves of a vacuum system. I have a PXI-1010 systems with a NI-PXI-8176 controller running WinXP and a NI-PXI-6052E DAQ board. For your information, I enclose a compilation of print screens showing the hardware and channel configuration in MAX (MAX_PrintScreen.bmp). (Note that MAX was not running during the tests described below.)
 
I have attached two sample programs. The DIGRead.vi attempts to read the open/closed status of twelve valves (corresponding to TRUE/FALSE of the corresponding digital lines), displays the current line reading in the indicator "line state", and forwards the value to the corresponding LED indicator via data socket.
 
I have listed the physical state of the valves during the test. If I run the vi, I expect the line state indicator blinking, as a function of the state of each line. At the same time, I expect the valve states to be displayed in the LEDs, i.e., OFF, OFF, ON, OFF, ON, OFF, ON, ON, ON, OFF, ON, OFF.
 
What actually happens is that the "line state" LED does not blink, an none of the LEDs is lighting up. This behavior is puzzling, as the other attached vi (2007N15 - Actuate Valve.vi) is reading the lines and correctly displays the current line state in the indicator "Old Status". This second vi has been working fine for years!
 
What is going on?
Thanks for your help in troubleshooting this issue.
Peter
0 Kudos
Message 1 of 17
(4,527 Views)

Hi Peter,

I took a look at the VIs, and have tried to think about what is different between the two VIs that could explain why one works and one doesn't.  In TestRead.vi, I think that we can safely say that the DataSocket part of the application is not the problem.  Since not even the line state indicator is showing any changes, we can probably assume that the problem is with the Read from Digital Line VI. 

Offhand I don't see any problems with the code.  However, when I have one program that's working and one that isn't, I usually try to modify the one that is not working to be as similar as possible to the one that IS working.  This could be a shot in the dark, but have you tried seeing what happens when you don't wire anything to the device and/or port width inputs of the Read from Digital Line subVI, as you have in 2007N15.vi?

It seems like this must be a programming problem, and not a hardware problem, since everything works fine with the other VI. 

0 Kudos
Message 2 of 17
(4,505 Views)

Thank you, Elisabeth, for taking a look at this issue.

Yes, I have tried before not wiring anything to the inputs, as in the 2007N15 vi. I have also tried wiring other values (e.g., port width 16) to the vi, but the behavior was always the same. I am also convinced that it is not a data socket problem, particularly because the 2007N15 vi also uses data socket and the same channels.

I would be interested to know whether this issue can be reproduced on a different PXI 1010 system, or whether it is just my instrument.

Regards, Peter

 

0 Kudos
Message 3 of 17
(4,504 Views)

Hi Peter,

I stripped the VI down to the minimum functionality that should still reproduce the problem.  Does the attached subVI correctly read the relay states?

0 Kudos
Message 4 of 17
(4,485 Views)
Sorry, looks like I forgot the attachment....
0 Kudos
Message 5 of 17
(4,482 Views)

Sorry. Can't open it. I have LV7.0. Looking forward to trying this out.

Peter

0 Kudos
Message 6 of 17
(4,479 Views)

Hi Peter,

Sorry about that.  I saved it for 7.0.  Here it is.

0 Kudos
Message 7 of 17
(4,469 Views)
Thanks Elisabeth.
I tried the TestRead2.vi out, and got the same result. I also found some other interesting things.
 
Here is what I have done step by step.
 
1. Re-start system from power off.
2. Run TestRead2.vi: Line States indicator displays FALSE for all channels, instead of FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE.
3. Multiple attempts to run the vi produce the same result as in 2.
4. Start Data socket server manually from Start Menu.
5. Run 2007N15 - ...vi: Old Status indicator displays FALSE instead of TRUE, Status indicator displays FALSE instead of TRUE --> Read from Digital Line.vi does NOT read the channels.
6. Multiple attempts to run the vi produce the same result as in 5.
7. In 2007N15 - ...vi, set Open/Close control to OPENED, run vi: Old Status indicator displays FALSE instead of TRUE, Status indicator displays TRUE --> Read from Digital Line.vi does not read the channel the first time, but does read it the second time.
8. Set Open/Close to Closed, run vi: I can hear the valve closing, Old Status indicator displays TRUE, Status indicator displays FALSE --> Read from Digital Line.vi does read the channel correctly both times. I know from experience that from now on until the next reboot, I will be able to actuate all the channels correctly. (I never monitored the behavior of the old status indicator, so I do not know whether the first read digital line works correctly.)
9. Run TestRead2.vi again: Line States indicator displays FALSE for all channels, instead of FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE. --> TestRead2.vi still does NOT read the channels.
10. Multiple attempts to run the vi produce the same result as in 9.
11. In 2007N15 - ...vi, set channel to Valve3 (default), Open/Close control to OPENED, run vi: Old Status indicator displays FALSE, Status indicator displays TRUE --> correct behavior
12. Run TestRead2.vi again: Line States indicator now displays
FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, instead of
FALSE, FALSE, TRUE, FALSE, TRUE,   FALSE, TRUE,  TRUE,  TRUE,   FALSE, TRUE,   FALSE. --> TestRead2.vi only reads the channel that has just been actuated before.
13. The same behavior is observed, if steps  11 and 12 are performed for Valve5, i.e, Line States indicator displays
FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, instead of
FALSE, FALSE, TRUE,  FALSE, TRUE, FALSE, TRUE,   TRUE,   TRUE,  FALSE, TRUE,   FALSE.
 
Puzzling isn't it?
 
Peter
 
0 Kudos
Message 8 of 17
(4,467 Views)
Hi Peter,
I have some questions to help troubleshoot this issue. When you run TestRead2.vi (and TestRead.vi as well), what program do you run to change the values of the relays? The other application, 2007N15 - Actuate Valve.vi has a Write to Digital Line VI to set these values. Are they already set in a different state than all open?
 
What do you mean when you say "Read from Digital Line.vi does NOT read the channels"? Does this mean it gives the wrong values, gives an error, or hangs?

Regards,
Missy S.
Project Engineer
RoviSys
0 Kudos
Message 9 of 17
(4,450 Views)
Thanks Missy.
The lines had been set before the reboot using the 2007N15...vi. As you know, these relays maintain their state during a re-boot (and even if you turn off both the PXI and SCXI unit).
 
One idea I had today is that the Feedback node in Read from Digital Line.vi is not initialized and may contain garbage at the beginning, so that the case structure does not go through the port configuration. I will check this today.
 
Peter
0 Kudos
Message 10 of 17
(4,435 Views)