Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a DAQ program with an additional plot of RPM using hall effect signal

I have some experience with LabView, but zero experience using DAQ’s and queues. I need help with updating a LabView program to add another plot of RPM onto the same graphs as drive force, torque, and current.

 

I didn’t create this program; rather, I am attempting to update its capabilities. The program I started from just had a live indicator for RPM on the front panel. The RPM data was sourced from a hall effect that pulses on each revolution of a magnet. The data on the live indicator is accurate, so there’s no problem with that.

 

Current Schematic:

npsands2020_0-1703002016715.png

 

 

 

The RPM data is collected in LabView by a DAQ assistant using the counter function. This DAQ assistant block is separate from the DAQ assistant collecting the analog signals of drive force, torque, and current, which is the main cause of the problems I am encountering. I cannot figure out how to run both DAQ assistants simultaneously and merge the RPM data into the array of data that is fed into the XY graph and waveform graph with the rest of the measurements.

 

Current block diagram (arrows pointing from RPM live indicator to the output graphs):

npsands2020_1-1703002016815.png

 

 

I took several approaches to try to achieve this, all of which failed. One approach was to create another set of independent RPM producer and consumer loops (additional obtain queue, enqueue element, dequeue element, and flush queue blocks), but I kept running into errors at the dequeue blocks. Another approach was to just have an additional producer queue for RPM (additional enqueue element and flush queue blocks), but the RPM data would not appear at the dequeue element block where each measurement is split up to be processed.

 

Additional producer queue approach:

npsands2020_2-1703002016717.png

 

I suspect one of those approaches is the correct way to do it, but my limited knowledge of DAQ assistants and queues is preventing me from finding the solution.

 

One last thing I tried was instead of using the counter DAQ assistant, I connected the hall effect signal to another analog input on DAQ NI-9201 and added a Tone Measurement block on the data output to calculate the signal’s frequency. This seemed to work OK in its own program, but when combined with all the other measurements running simultaneously, the program stalled and couldn’t keep up.

 

Hall signal used as analog signal:

npsands2020_3-1703002016662.png

 

 

I would greatly appreciate it if you could steer me down the right path to achieve this and give some tips on how to use queues and DAQ assistants.

 

Thank you!

0 Kudos
Message 1 of 2
(215 Views)

Hi npsands,

 


@npsands2020 wrote:

I cannot figure out how to run both DAQ assistants simultaneously and merge the RPM data into the array of data that is fed into the XY graph and waveform graph with the rest of the measurements.

 

I took several approaches to try to achieve this, all of which failed.


You measure the RPM value in "single sample on demand" mode, while the other data is acquired in "continuous" mode, reading several hundred samples. Whne you want to display the RPM value in the very same graph as your other data, then you need to build a plot in the same way as the other plots!

You may create an array of samples from your scalar readings…

 


@npsands2020 wrote:

I would greatly appreciate it if you could steer me down the right path to achieve this and give some tips on how to use queues and DAQ assistants.


  • I REALLY recommend to get rid of the DAQAssistent and use plain DAQmx functions instead!
  • I also recommend to get rid of all the other ExpressVIs and DDT wires.
  • It also would help to reduce the usage of local variables.
  • And definitely it would help to stop all loops or none - right now there only is one loop that really stops when you use the stop button…

@npsands2020 wrote:

I didn’t create this program; rather, I am attempting to update its capabilities.


My STRONG recommendation: start over from scratch!

When I would be the customer of that test bench then I would reject such code.

Testing combustion (?) engines may be harmful to the testbench staff…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(154 Views)