ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphs

IS there any way to get multilple inputs (A,B,C...) into a chart or graph?

0 Kudos
Message 1 of 5
(9,084 Views)

Hi ddunlavy,

This is definitely possible, you can just place your inputs in an array or a cluster and wire that into the graph/chart. On the front panel, you can expand the plot legend (by default at the upper right of the graph) to show the legend for the additional plots.

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,585 Views)

Well I am still having trouble as I have a state machine with a while loop inside that state machine running my 6 different voltages, as I propogate those voltages out of the while loop - they are on a single wire, I tried utilizing a unbundle and the "split signal" tool, but I still get 1 collected signal on a single trace along the graph, with all the 6 voltages cycling thru. When I try to propogate those voltage outside the State machine, I get no signal at all. My goal is to have one(1) graph with 6 traces for each voltage, but I can't get them seperated. Right now I am having to use 6 seperate graphs inside the while loop to graph my voltages. Even when I use a "mixed signal graph - I get only the one trace with all 6 voltages on it. I have not seen any examples of this anywhere on the website.

0 Kudos
Message 3 of 5
(3,585 Views)

Hi,

Are you reading single points within your loop, or arrays or waveforms of data? You need a 2D array of points or a 1D array of waveforms for the graph. If they are single points, you can use a build array to convert the point to a 1D array and then wire them through an auto-index tunnel to get it a 2D.

Another thing you can try is to use a transpose array, which will swap the rows and columns in the array.

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,585 Views)

This NI tutorial video shows one way to use the chart with 3 inputs ... in his example, the chart is within the while loop.

http://zone.ni.com/devzone/cda/tut/p/id/8069

He has one live variable, and 2 constants as upper/lower limit bars ... but the theory is the same.

[edit] it's on the "Part 2" video

0 Kudos
Message 5 of 5
(3,585 Views)