Author Topic: Controlling of PLC thru java  (Read 10376 times)

sq

  • Newbie
  • Posts: 1
  • I love YaBB 1G - SP1!
    • View Profile
Controlling of PLC thru java
« on: October 03, 2002, 05:15:18 PM »
How do we make the switch like being turned on once it is pressed and when pressed the second time it will be switched off?
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: Controlling of PLC thru java
« Reply #1 on: October 03, 2002, 07:54:39 PM »
Are you refering to implementing a toggle button on the PLC or are you talking aout the visual "button" on Java AWT?

If you are refering to the PLC, then there are many ways of doing it. If you use the M-series, the built-in "ToggleIO" command does exactly that. Executing the ToggleIO on any I/O label name will change it from OFF to ON or from ON to OFF.

See other examples in the "Toggle_Switch.PC5" file which we listed 3 methods of doing so.

If you are refering to Java AWT. You may have to create your own 3D button graphic and in your code you select whether the 3D is recessed positively or negatively or changes it color to give it the "pressed down" look. Ask some other Java Guru and you may get better suggestions.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS