12-05-2018 10:25 AM
Hello!
I'm new to labview and I have a question in a code.
I'm working with a set of 8 force sensors that are connected to two Phidgets bridges working in parallel. In my code (which has a confusing organization) I have the system start the bridges, check the serial number and the channels, measure the voltage value of each channel to which each sensor is connected and save the data.
I have a part of the code placed above where I "tare" the sensor 1. My question is, how can I apply this to the 8 sensors?
Attached i sent the labview VI and a print-screen of the code to tare the sensor.
I hope someone can help me.
Thank you,
Rita
12-05-2018 01:39 PM - edited 12-05-2018 01:39 PM
You sure have a lot of duplicate code! read the sensors in a FOR loop and operate on an array of 8 values. Keep an array of 8 references values in an array shift register to tare. Your code will shrink to ~10% keeping the same functionality.
All (or most of) your controls and indicators should be arrays (Device info, gain, etc.)
12-06-2018 03:47 AM
But I want that the 2 bridges work in paralel , so i need to make 2 arrays each one with 4 sensors?
Can you show me an exemple in how to use the array of 8 values in same VI and obtain an output in an array? (I dont know if you understand but i dont know how to explain better, sorry )
12-06-2018 04:41 AM
For exemple, I have a device info of 4 sensors and I want to start the voltage reading for that 4 sensors using the VI "VoltageRatioInputStart". How can I do that with the arrays intead of using 4 times the same VI ?