LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Read y=f(t) graph

Solved!
Go to solution

Hello,

 

I am using VISA Read function to read motor current in string format from a motor controller. The string is read from the output "read buffer" of the VISA Read function. Is there a way to put the string value in a graph in function of time?

0 Kudos
Message 1 of 16
(3,146 Views)

Hi Trainee,

 

yes, there is: You need to parse the string to get the numeric values you're interested in!

 

For such questions it would be a great help to provide examples of these "strings" and their "string format"…

Best regards,
GerdW


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

Thanks. The strings that I received are as follows : 

 

A=10

BA=15

 

When I looked at the return count indicator of VISA Read, it shows a value of 11. So I think there is a space after 10 and 15 of the above message.

 

Is there a way to extract just the number 10 and 15 and plot them in a two separate graphs in function of time? (Note : the values 10 and 15 are not constant, they change as time pass. The maximum digit of these two values are two digits; they can change from 0 to 99)

0 Kudos
Message 3 of 16
(3,136 Views)

I think I made a mistake. It shouldn't be a space after 10 and 15 but rather an "enter" to jump to the next line. Can you help me please?

0 Kudos
Message 4 of 16
(3,130 Views)
Solution
Accepted by topic author Trainee123

Hi Trainee,

 

something like this should do it:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(3,126 Views)

Thanks again. I can't seem to find the chart function. May I know in which library it is located please?

0 Kudos
Message 6 of 16
(3,117 Views)

Hi Trainee,

 

I used ScanFromString, followed by Bundle (from Cluster palette)…

The terminal named "chart" is a chart on the front panel!

 

If you have problems recreating that simple snippet you should take the free online courses offered by NI on their website!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(3,110 Views)

Sorry I just found it in the front panel library. There are chart and graph. May I know what is the difference? The graph looks better with the grid on. But I can't seem to wire the output to the graph.

0 Kudos
Message 8 of 16
(3,107 Views)

Hi Trainee,

 

LabVIEW comes with a lot of example VIs!

 

There are also examples explaining the difference of graphs and charts by illustrating how to use them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 16
(3,100 Views)

I got an error message "LabVIEW: Scan failed. The input string does not contain data in the expected format" I attached a picture of the program. Can you help me please?

Download All
0 Kudos
Message 10 of 16
(3,094 Views)