LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Analog Input Switch

Hi,

I'm currently working on an alarm system which when a physical switch is set to on, the alarm turns on. 

This works for my 4 alarms in the 4 Digital Input ports but I have 2 more alarms remaining to wire up which I'm trying to do in the Analog Input ports but I'm unsure how to make it work in my program.

For my DI ports, I used this code: https://gyazo.com/34dbd795fa073da84db7f8c77eb1a2a5

For my AI ports, I used this code: https://gyazo.com/3463f2532a3724d783a6d3bc03c1812d

 

I set the MIN voltage to 0, MAX voltage to 5 but it automatically triggers the alarm even if the switch is OFF.

I selected the VOLTAGE option in the DAQ Assistant setup but I don't remember exactly how I got there.

Is there something wrong with the way I've done it? I'm basically saying that if the voltage is above 2.5, "5" is ON so if switch is ON then it should trigger the alarm. However, it automatically triggers the alarm even if the switch is OFF.

 

Can anybody see the problem?

 

Thanks in advance!

0 Kudos
Message 1 of 2
(1,983 Views)

Hi PineappleExpress,

 

What hardware are you using? How are you making the connections to your modules (What pins are you plugging things into)? What termination configuration are you doing (RSE, diff, default, etc.)?

 

I would recommend making sure you have everything setup correctly using NI MAX test panels. This way you can quickly verify if all your hardware is setup correctly. If you use a MAX test panel, do you see the voltage at zero when the switch is off, and 5 Volts when the switch is on?

0 Kudos
Message 2 of 2
(1,931 Views)