Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

9481 Controlling relay with boolean switch using DAQ assistant -- problems

Solved!
Go to solution

Sorry for what may be stupid question but I am stuck in quicksand.

 

I have using a 9481 relay module and have two external relays attached to lines 0 and 1.

 

When I create a digital output line to line 0, I can run the test inside express and turn the relay on and off no problem.

 

The DAQ expressed generated block expects a boolean 1D input. (See pict attached).

 

I want to hook up a boolean switch to drive relay line 0. You can not direct connect because the switch is boolean and the input is boolean 1D -- I do a conversation in the pict.

 

While probing the lines show the expected results, the relay never activates.

 

Any heap would be greatly appreciated! Thanks

 

2-14-2013 4-49-44 PM.png

0 Kudos
Message 1 of 10
(17,461 Views)
Solution
Accepted by Mr_Mechanical

Mr._Mechanical,

 

Welcome to the NI Switch Forums, while this forum is generally meant for NI-SWITCH Products [such as the NI PXI-25xx & NI SCXI-11xx], I believe that I know the answer to your question.

 

I think the reason why this is failing is that the conversion you are doing generates an array of 16 booleans [as the "boolean to (0,1)" function creates a I16 datatype] with your data plus 15 false data points.

 

array.PNG

 

When you try to command the relay it sees 16 datapoints you are commanding to a single port [channel] and should error out.

 

error.PNG

 

My suggestion would be to use the normal DAQmx digital output vis [with it set up as "Digital>>Single Channel>>Single Sample>> Boolean (1 Line)"] instead of the DAQ assistant.

 

If you must use the daq assistant, simply using the "Build Array" function will turn your single boolean data point into an array of booleans with one element.

 

Build Array.PNG

 

While the DAQ assistant is very easy to use, I DO NOT recommend using the DAQ assistant as this reduces functionality and increases execution time.

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 2 of 10
(17,451 Views)

I have the same problem. Where do I access the  "Digital>>Single Channel>>Single Sample>> Boolean (1 Line)"

0 Kudos
Message 3 of 10
(17,191 Views)

It should be the DAQmx Write.vi in the DAQmx Palette.

 

See images below.

 

Palette.png

 

DAQmx Write.png

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 4 of 10
(17,183 Views)

Hi Frank -

      I have a simple circuit - a solenoid hooked to Dev1/port0/line0 of a USB-6525. When I bring up DAQ Assistance, I can turn the solenoid on and off.  Now I want to take a boolean switch and turn on the solenoid.

 

1) First I took the output of the switch into a build array then into the data-in of the DAQ Assistant. The circuit compiles runs without error, but the solenoid does not activate when I hit the switch.

 

2) Then I tried taking the switch output into the Daqmx write.vi. I do not know what to use as a task in and task out, so the circuit errors out.

 

I am driving 4 solenoids with various "on" times and repeats and I had it running with an Arduino in a few minutes, but I guess I do not understand how the digital I/O is intended to work.

 

hmmm. What to do? Kim.

0 Kudos
Message 5 of 10
(17,175 Views)

Kim,

 

To create the task, try using the following functions shown in the image below.

Capture.PNG

 

This was taken from the DAQmx Example found (in LV 2012) in the "Hardware Input and Output>>DAQmx>>Digital Output>>Digital - SW-Timed Output.vi" section of the NI Example Finder. [Accessed via LabVIEW in "Help>>Find Examples"]. I modified the original file to use a single point [as discussed in the previous post].

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 6 of 10
(17,162 Views)

I am having another problem with the 6525. If I toggle the output line fast once a second, then I get the following error:

Error -201278 occurred at DAQ Assistant
Possible Reason(s):
Consecutive writes to a digital line occurred more frequently than the device can safely allow. 

I replaced the solenoid with an LED (20ma current) and I get the same error.

 

Is there a repitition rate limit on the 6525?

Thanks, Kim

0 Kudos
Message 7 of 10
(17,149 Views)

Kim,

 

The 6525 has a switching rate of 5 operations per second. If you are going faster than this, there may be an error. Try reducing the switching cycle rate.

 

It might also make sense to put the DAQmx write in an event structure so that it only calls it when you change the Boolean, just in case re-writing true counts as a write.

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 8 of 10
(17,146 Views)

Hey,

 

I am using LAbview 2016 with a 18200-00 DAQ USB from Cole and Parmer. In my application I want to open and close a relais (5V). However, When i set the boolean on TRUE, the relais does not react. how do i configure the bit on the board as a digital output? I think this is the problem.

0 Kudos
Message 9 of 10
(10,333 Views)

BJorge,

 

Although this is likely unrelated to the previous discussion, or NI Switches; my best guess is that the current / voltage output is not powerful enough to drive the relays. Do you have specifications for the relay you are using?

 

According to that product documentation, it appears in Digital Output Mode it can only output 3V / 2.5mA which is not enough for a 5V relay. In Analog Output Mode, it can output a Maximum of 5mA @ 4.9V. Again this may not be enough to drive the relays you are using

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 10 of 10
(10,327 Views)