From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Signals from Multiple Analog Read Blocks to a Single Voltage Meter

Solved!
Go to solution

I have an Arduino Mega board, which allows 16 (A0-A15) analog input connections. I have the first 5 (A0-A4) analog pins connected to circuits that include FSR sensors. I want a single voltage meter and waveform chart to show the output (in V) of whichever sensor is triggered, so I tried merging the signals from each analog in pin, then running the merged signal into a voltage meter and waveform chart. The problem is that only values from the A0 pin FSR sensor are showing up on the voltage meter. There is never more than 1 sensor triggered at the same time, so I thought the meter would show the value of whichever sensor was currently triggered instead of showing 0V at all times unless the sensor connected to A0 is triggered. I also added in an image of the block diagram I currently have if that helps make sense of what is mentioned above. I have a meter for each sensor connected to an analog input pin so I can make sure the sensors are actually working as they are triggered. When, for example, sensor 2 connected to A1 is triggered the value will show on A1's voltage meter but not on the merged sensor meter. I don't have previous experience in LabVIEW and have been reading up a lot on forums, but just haven't found anything that can fix this issue or let me know if it is even possible to do! Since the sensors work individually I know it is something with merging the signals that is causing the issue, not sensors that arent connected well or wired incorrectly. Thank you in advance!Capture.PNG

0 Kudos
Message 1 of 3
(1,579 Views)
Solution
Accepted by eng19

Your issue with the merge signals might be because they are not all in the same time period.  Since you are doing 1-channel reads they will each have their own timestamp.

 

I am not sure if it is possible to do a multi-channel read in LINX but if it is that would optimize your code and give you what you want.  Or if not you can manually combine each channels read into a single time reference to give you the display you want but this would not completely be accurate as the time would always be from your reference signal.

David Wilt
The New Standard LLC
Message 2 of 3
(1,568 Views)

I don't think that 'merge' is the function you want, it's probably an array or cluster that you need.......look at the examples for charts and graphs to find the one that suites.

Message 3 of 3
(1,559 Views)