Toggle an output with hardkey.

Post Reply
Posts: 45
Joined: Sat Feb 09, 2019 6:23 pm

Toggle an output with hardkey.

Post by aldoo »

I want to toggle an output with a hardkey, so i have doubts that instructions to use: gvarget, gvarset, portget or portset. Could you shared an example?

Posts: 320
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Toggle an output with hardkey.

Post by ivan »

The easiest way to toggle an output using a hardkey would be through the Settings > Config > Panel/Pendant > Hardkeys window, like so:


In this situation, I have assigned output 8 to be turned on when I press a hardkey which is connected to input #8, and turn off when I release that hardkey.

If you are doing this through a PLC, the way to do it would be by using the portset command to turn on an output. The gvarset command is used to control global variables, while the portget and gvarget commands are used to retrieve the state of the output port or the value of the global variable.

Post Reply