02-18-2020 09:18 AM
Hello,
I have some sort of doubt in waveform chart.
In the waveform chart can we set x axis scale like (0 to 10).
I have been tried to change the scale.but when I run the program it showing like time stamp like ( time, HH-MM-SS).
I need like this (0 to 10) can we set like that in waveform chart
I had attached my screenshot.
02-18-2020 09:25 AM - edited 02-18-2020 09:27 AM
Hi Balaji,
@Balaji_dm wrote:
I have been tried to change the scale.but when I run the program it showing like time stamp like ( time, HH-MM-SS).
I need like this (0 to 10) can we set like that in waveform chart
You can change the formatting of the X axis to show numbers instead of timestamps…
But a chart will always count up the number of displayed samples, so it will be hard to maintain a scale fomr 0 to 10. Maybe you should use a graph instead?
Instead of attaching a screenshot you should inline the image in the message text:
02-18-2020 10:22 AM
Hi Balaji_dm,
You can change this by right-clicking on the chart and navigating to the "Display Format" tab. Select your x-axis from the drop-down menu and then you can select the display type. At the bottom, you have two options for time (absolute and relative) but you can also just set it to be standard numeric formatting. Then, on the "Scales" tab, you can select the same axis and change the name to reflect the correct indexing variable (I'm assuming it's sample here) and also change the axis max/min and scaling factor to change the scaling of that axis.
To GerdW's point, depending on what you're doing, you may want to look at an XY graph which would let you specify an array of x values to pair with the y values. That gives you a lot more flexibility to define your x-axis values however you want.
02-18-2020 01:08 PM
The Waveform Chart is a very smart object. When you place it on the front panel it shows 0 to 100 for the X axis and the terminal is orange. The second you wire a waveform object to it, it shows the date and time and terminal turns brown. If you are adding points to the chart one at a time, just unbundle the Y array and index the first value into the Chart. The terminal will turn orange again (or blue if you wire an integer). The front panel automatically switches back to the numeric value you are looking for.