LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Data from Two Separate Sources

I have an Arduino sending a number (angle from a motor) over serial to my PC. I also have an ATI load cell sending voltages to an NI USB-6356 DAQ. These voltages are then conditioned to forces and can be saved to a file. My issue is coming in when I try to put my angle from the Arduino together with the force data and export it to a file. 

What I'm getting is all the forces/torques and then in the column that I want to be the angle, I'm just getting one value of the angle (see below). The end result should be a list of forces/torques and angles that correspond to those forces/torques. 

ccoursey_0-1631226681613.png


First I tried using build array to convert my angle into an array, and that didn't work (it only made it a 1D array). I've also attempted to force my angle to be saved as a 2D array that populates beyond the first position, and that didn't work. 

I think the fundamental issue is that when I open a probe on the voltages, I see they're reading off continuously (see below). 

ccoursey_1-1631227016471.png

 

But when I open a probe on my angle, it's reading off continuously, but not updating in the same way (see below).

ccoursey_2-1631227131799.png

 

I've attached my VI. Any help is appreciated! 

 

0 Kudos
Message 1 of 2
(1,270 Views)

Could you share your Arduino sketch as well?  I'm mostly interested in the serial communications.  I think we can simplify that quite a bit.

 

On a more general note, you really should learn to use Shift Registers.  You can avoid some of your local variables that way.

 

You can also change the "mechanical action" on your buttons.  If you change it to a "Latch When Released", then the control will reset itself when the terminal is read.  Again, this will eliminate some of your local variables.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(1,264 Views)