LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cDAQ9188, NI 9401 handling multiple signals

Hi

 

I'm currently using a vi that can measure the slip on a belt between two pulleys. Shaft rotation/gearbox ratio. On mechanically simple machines there is no gear box so we can see the correlation between engine RPM and shaft RPM fairly easy using two hall effect sensors. If we add a force transducer to measure the leverage effect while loading the shaft combined with the shaft RPM you could determine the kW/HP on the outgoing shaft.

 

Here is the tricky part, the vi I'm using is only working through the input signals from the hall effect sensors. So if the engine is not turned on the program will freeze and no other inputs in the loop can be used.

Equipment

Item

NO

Item Description

Honeywell micro switch

2

Hall effect sensors 103SR13A-1

Industrial magnet

2

Switch element for Hall effect sensors

NI 9401

1

5 V/TTL, Bidirectional Digital I/O, 8 Ch Module

NI cDAQ-9188

1

NI CompactDAQ 8-Slot Ethernet Chassis

Tri-Output

1

Adjustable DC Power Supply

 

At the moment I use the gate inputs with corresponding COMs on the  9401 to acquire the signal, and a pull up resistor to invert the signal from the hall effect sensor.

 

I have made most of the programing in the loop, so that's pretty much my skill level. So now when I need to add more signals to the vi I'm quite a bind since I do not know how to continue.

 

Features wanted of program:

Using the NI 9401 inputs to measure more signals than just the two hall effect sensors. Adding more signals.

 

Making the program independent off the signal from the sensors. The program shall not freeze.

 

Any help on the matter would be appreciated  

 

Best Regards

Tholin

 

 

 

0 Kudos
Message 1 of 4
(3,206 Views)

Hi Tholin,

 

In your program where are you measuring the Hall effect sensors, is it with the DAQ Assistant? 

 

To measure more signals on the same device you are able to simply select more channels when selecting the channels in the I/O input when selecting browse and then selecting more than one of the channels. Here you can then read an array out of the DAQmx Read.vi which you can then split up into individual parts if that is what you are hoping to do. You will also be able to do this in a DAQ assistant if you would prefer.

 

If you are wanting to do this at different rates then you will need to have separate tasks/DAQ assistants depending on the method you are using to acquire data.

 

Let me know if this helps.

 

Luke

 

 

0 Kudos
Message 2 of 4
(3,129 Views)

Hi Luke

 

Thank you for your answer.

 

I'm using the DAQmx create virtual channel that goes trough a Flat Sequence structure containing a DAQmx star task. Which is then read in the loop with a DAQmx read. All this can be seen in the program I uploaded. (I didn't write that part of the program, it's a copy past from a similar problem) What I can conclude is that the control task is reserving the second signal so both singals can be processed. But I don't want the program to be dependent on the signals, thus I want a loop that is run in a loop acquring the signals in real time. 

 

All I do in the loop is managing the signals acquire to make the different calculations. 

 

The problem with the frequency counter is that the 9401 does't seem to allow multiple signals, I have tried SignalExpress to see if I could acquire more signals but I get the error message:

 

"Error-20113

 

Cannot be configured for in/output since lines/terminals are used by another task. This operation requires temporarily reserving all lines/terminals for communication."

 

The easy solution seems to be; getting more 9401 modules, since handling more signals seem tricky and I'm relatively new to LabView I don't have the experience to set up such a system.

 

 

0 Kudos
Message 3 of 4
(3,090 Views)

Hi Tholin,

 

The error -20113 generally occurs because the digital lines of the device have been reserved in the wrong order. It may be worth having a look at a knowledge base article that we have on this topic which has also got a snippet of code with this so you can see how to correctly reserve the ports. 

 

Why Do I Get Error -201133?

http://digital.ni.com/public.nsf/allkb/0495B7D5E2345DF386257730007EFD17?OpenDocument

 

Luke

0 Kudos
Message 4 of 4
(3,061 Views)