LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to plot x, y, and z plots

I have a board that can listen for a command and return the appropriate sensor reading. For example, sending 0x78 returns the x magnatic field reading. The magnetic field value is returned in a 2byte hex value. So, far I've been able to connect to the board, send the request, and recieve the sensor value.

 

The problem is storing them. I would like to store these values in an array/table. The table should have 100 rows and 4 columns (x, y, z, temp). When the user clicks the record button, one row of this table will get filled. Then, I would like to plot the (x,y, z, and t) values on four different plots.

 

I am having problems storing these values to an array/table. Can you help me store them? I've attached an image with what I have in my VI so far.

0 Kudos
Message 1 of 4
(2,697 Views)

Hi Marko,

 

1) You better attach a VI instead of a picture. It's much easier to edit in LabVIEW...

2) You better go to the basics course and learn about shift registers and state machines instead of duplicating code and using local variables...

Best regards,
GerdW


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

I've attached the VI with what I've added so far

0 Kudos
Message 3 of 4
(2,664 Views)

Hi Marko,

 

Given your VI, you are receiving already predetermined values for time, so in this case, we could use an XY Plot to associate each value of time with its correspondant x, y or z value. In my example I have a For loop that is just outputting a set number of values in order to generate examples of each variable, then I'm just building an array so you can compare the x, y or z value with respect to time.

What version of LabVIEW are you using? I'll upload it in LabVIEW 2010, if you need a previous version, let me know. Here's a screenshot of the code too.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
Download All
0 Kudos
Message 4 of 4
(2,630 Views)