07-05-2022 05:39 AM
hello everyone,
Im reading the 4 same type of sensors which is attached to Arduino. I can able to read one sensor using the my lab-view VI. now want read other three with same VI..can you give me some idea??
Solved! Go to Solution.
07-05-2022 06:09 AM
First suggestion would be to attach the Source code for reference.
If all your sensors are connected to same Arduino with different I/O's / Channels with you can modify your code to read multiple channels (Multiple Sensors) using same VI.
If you are connecting multiple Arduino for multiple sensors then you can go Clone VI
07-05-2022 06:10 AM
@jeet4230 wrote:
Im reading the 4 same type of sensors which is attached to Arduino. I can able to read one sensor using the my lab-view VI. now want read other three with same VI..can you give me some idea??
You could use a FOR loop to iterate through all of the readings you want.
07-05-2022 06:18 AM
Can you explain me bit in detail? how can i use the for loop? because i going to attach 4 different waveform chart to the 4 different sensor values.
thank you in advance.
07-05-2022 06:30 AM
Share the code you developed which works fine for 1 sensor.
07-05-2022 06:45 AM
hello,
Im attaching the the vi. so this is for 1 sensor. i want to do it for multiple sensors.
thank you
07-05-2022 07:15 AM
Please down convert to LV17 version and share.
07-05-2022 07:21 AM
done and attached.
07-05-2022 07:41 AM
Hi jeet,
you are sending 14 command strings to your Arduino, just to read one specific sensor?
How do you switch the AI channel on your Arduino? Which command do you need to change to read a different channel/sensor?
In the end it boils down to "send the same commands again, but change the one command selecting the channel/sensor"…
Btw. do you really need to wait 200ms between each command?
07-05-2022 08:03 AM
@GerdW wrote:
Hi jeet,
you are sending 14 command strings to your Arduino, just to read one specific sensor?
How do you switch the AI channel on your Arduino? Which command do you need to change to read a different channel/sensor?
In the end it boils down to "send the same commands again, but change the one command selecting the channel/sensor"…
Btw. do you really need to wait 200ms between each command?
If he had written his Arduino code properly, he could send back readings from all 4 sensors with 1 response.