LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change the color of part of a waveform plot based on button

Solved!
Go to solution

Hi, thank you for the response. The problem is that it changes the color of the entire plot, and I had some issues with manipulating the DAQ Assistant signal, because i want to use a waveform chart to keep history of sensor measurement.

0 Kudos
Message 11 of 25
(384 Views)

Hi Mehdi,

 


@MEHDI_LIS wrote:

The problem is that it changes the color of the entire plot, and I had some issues with manipulating the DAQ Assistant signal, because i want to use a waveform chart to keep history of sensor measurement.


As I wrote before: instead of using InRangeAndCoerce you use the 3 buttons to determine the plot to be used.

It will not "change colors" as it works the same way the IRAC works right now!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 25
(370 Views)

This seems to be an AND operation:

if (according button is pressed AND signal index is in range) {

    return signal

}

else {

    return NaN

}

Greets, Dave
0 Kudos
Message 13 of 25
(345 Views)

I tried not using the range and InRangeAndCoerce function, but it didn't work.

0 Kudos
Message 14 of 25
(338 Views)

Hi Mehdi,

 


@MEHDI_LIS wrote:

I tried not using the range and InRangeAndCoerce function, but it didn't work.


So what did you try?

What exactly "didn't work"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 25
(333 Views)

I used the boolean state of buttons as condition instead of InRangeAndCoerce. I tried also to do the  AND operation:

if (according button is pressed AND signal index is in range) {

    return signal

}

else {

    return NaN

}

0 Kudos
Message 16 of 25
(347 Views)

@MEHDI_LIS wrote:

I used the boolean state of buttons as condition instead of InRangeAndCoerce. I tried also to do the  AND operation:

if (according button is pressed AND signal index is in range) {

    return signal

}

else {

    return NaN

}


It would always be best to attach the latest status of the VI so everyone can see how you implemented the logic and why it may/may not work.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 17 of 25
(327 Views)

Please you find attached the latest vi.

0 Kudos
Message 18 of 25
(314 Views)

Hi Mehdi,

 

what about this simple modification:

(You could even replace those stacked FOR loops now, but I left them intentionally.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 25
(306 Views)

Hi, thank you for the response. So i had the same problem as i said before, this creates one curve with one color when i click on button ( when i click on another button it creates one another curve with one color) but not differents sections with differents colors.

0 Kudos
Message 20 of 25
(276 Views)