LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean state change checker

Solved!
Go to solution

Hello!

I'm devolping a test software to check an EV charger board, and I'm having trouble with the part of the test that checks if certain booleans changed states during the test.

 

To explain better, during the test the board turns on, checks to detect a vehicle, gets permission to start a charge, locks the charging port, starts to charge, stops the charge and then finally unlocks the port.

 

The problem is that I have analog readings and other checks that prevent me from measuring the boolean state of the motor forward and reverse signal (which are always pulled up and get turned off during 500ms when it locks/unlocks the charging port), and then the same problem with reading a change in stat with the activation of the relay to start and stop charging because I don't know the exact moment where this change in the boolean happens.

 

I would like to just add another step at the end of my program to check if the value of this different booleans has changed during the time that the test was runnning, but I don't know how to do it, I think I would need like maybe just a global counter with the times that each boolean has changed and if it's greater than 1 the test was succesful, or having another boolean which would be like true=changed value, false=hasn't changed value. I don't know which one makes the more sense and I don't know how to implement them.

 

Thanks in advance

0 Kudos
Message 1 of 2
(221 Views)
Solution
Accepted by topic author Chamorrix

Hi Chamorrix,

 


@Chamorrix wrote:

I would like to just add another step at the end of my program to check if the value of this different booleans has changed during the time that the test was runnning, but I don't know how to do it, I think I would need like maybe just a global counter with the times that each boolean has changed and if it's greater than 1 the test was succesful, or having another boolean which would be like true=changed value, false=hasn't changed value. I don't know which one makes the more sense and I don't know how to implement them.


From your message title I would like to suggest the PtByPt-BooleanCrossing function...

 

From your message body you probably need some more code to also count the number of times the boolean(s) changed their value. BooleanCrossing allows you to detect rising or falling (or both) edges in the boolean signal...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(203 Views)