Hi all,
I have what is likely a simple problem. My program says when 2 buttons (we can call them buttons A and B) are held for 1.5 seconds, trigger a AutoRetract variable for my actuator (this is latched, the retraction continues until the movement is complete, you do not need to continue pressing the buttons). And during this auto retract, if you press (single press, not hold) button B, it will stop the movement.
This has been working well in general, however, if the user holds down A and B and happens to release button B slightly after A, the stop command is triggered. I want to only recognize the stop command after the AutoRetract has been running for 1 second. I made 2 small modifications to the code, but now when I test it, the AutoRetract starts as expected, but if button B is pressed to trigger the stop, I get faults from my module for "under voltage errors" which stops the actuators and requires a power cycle to my machine to clear out. I attached some images of the code.
NTWK 62 has been untouched, this is the command to trigger AutoRetract.
NTWK 64 and 65 was added to only allow the SeatStop command to work when 1s timer is full when the SitToStandSwitchDown (button B) is pressed.
Last image shows the variable that previous used to be button B that I replaced with the NTWK65 variable.
I know it is probably something simple that I am missing and creating confusing logic with, but help would be appreciated. Thanks!
I have what is likely a simple problem. My program says when 2 buttons (we can call them buttons A and B) are held for 1.5 seconds, trigger a AutoRetract variable for my actuator (this is latched, the retraction continues until the movement is complete, you do not need to continue pressing the buttons). And during this auto retract, if you press (single press, not hold) button B, it will stop the movement.
This has been working well in general, however, if the user holds down A and B and happens to release button B slightly after A, the stop command is triggered. I want to only recognize the stop command after the AutoRetract has been running for 1 second. I made 2 small modifications to the code, but now when I test it, the AutoRetract starts as expected, but if button B is pressed to trigger the stop, I get faults from my module for "under voltage errors" which stops the actuators and requires a power cycle to my machine to clear out. I attached some images of the code.
NTWK 62 has been untouched, this is the command to trigger AutoRetract.
NTWK 64 and 65 was added to only allow the SeatStop command to work when 1s timer is full when the SitToStandSwitchDown (button B) is pressed.
Last image shows the variable that previous used to be button B that I replaced with the NTWK65 variable.
I know it is probably something simple that I am missing and creating confusing logic with, but help would be appreciated. Thanks!