Detect rising edge in RAPID

I come from the world of PLC programming, where rising and falling edge detection is crucial in a lot of programs, but I can't figure out how to make it work in ABB RAPID.
What I want to do, is change the function of a physical button to a switch, so that when the button is pressed, a bit is reversed ( 0 -> 1, 1 -> 0), and it makes the most sense to me do to that via rising edge detection.
Scenario:
We're using zero-point clamping modules on an IRBP B250, and to open and close the modules, we use airpressure which is controlled by the robot controller. For safety, we've installed a button thats supposed to turn the air on and off, releasing and locking the clamping modules.
What I want to do, is change the function of a physical button to a switch, so that when the button is pressed, a bit is reversed ( 0 -> 1, 1 -> 0), and it makes the most sense to me do to that via rising edge detection.
Scenario:
We're using zero-point clamping modules on an IRBP B250, and to open and close the modules, we use airpressure which is controlled by the robot controller. For safety, we've installed a button thats supposed to turn the air on and off, releasing and locking the clamping modules.
Tagged:
Comments
It'll be neccessary both while started and stopped, which is why I have already put the test code in its own task.