05-07-2021 04:29 PM
I am trying to write a Labview program to turn on/off a 120 V solenoid valve (wired to NI USB- 6501 through a SS relay which gives 3-5V output). The problem I'm facing is that when I run the VI, the valve turns on at either Boolean values (1 or 0) but ideally I'd like it to turn on at 1 and off at 0.
I have attached the VI below. Can anyone help me figure out what I might be during wrong or if there's some other function I should be adding to make my VI work? I'm pretty new to using labview and would really appreciate any help!
05-08-2021 10:26 AM
Please share the connection diagram and the SSR model to help you better.
Since it is behaving in the opposite manner, the simplest solution is just to invert the boolean data before writing to DAQmx API.
05-10-2021 01:22 PM
Here's a schematic of the setup. The output lines from the relay are connected to the digital I/O ports on USB-6501. Thanks!!
05-10-2021 06:56 PM
You have not mentioned the Pins on 6501 connected to the SSR.
Ideally, you must connect the (-) terminal of SSR to GND and (+) terminal of SSR to any of the digital port line Px.y. If you are using the DIO in open collector configuration by connecting SSR+ to 5V and SSR- to Px.y, it is expected that you have to write a False boolean to turn ON the SSR.
Be sure to configure the task to be Active Drive, the default mode is open-collector and limited to 8.5mA per line.
05-11-2021 03:42 PM
Thanks for the reply!!
I connected the SSR+ to 5V and SSR- to P1.1 but the task is configured as active drive in NI-max. How do I specifically write a false boolean? Sorry I'm a bit confused
05-11-2021 04:28 PM
The easiest change, just to change the connection, connect SSR+ to P1.1 and SSR- to GND. You can retain the code that you've now.