Welcome, Guest
Username: Password: Remember me

TOPIC: Script for the Buttons.

Script for the Buttons. 4 months 4 weeks ago #3415

Dear Sir,

I would like to request a script for the "Raise" button within the motor popup. The script should activate the HOIST_C_Fwd tag when the "Raise" button is pressed and keep it active until the button is released. Upon release, the HOIST_C_Stop tag should become active.

Essentially, I need a script that controls different tags based on the press and release actions of a single button.

For your reference, I have attached images of the Motor Popup, the "Raise" button's control properties, and the tag properties for the start and stop commands.

Thank you for your assistance.

Best regards,
Chetan Kashyap
Attachments:
The administrator has disabled public write access.

Script for the Buttons. 4 months 4 weeks ago #3416

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 984
  • Thank you received: 134
  • Karma: -103
Dear Chetan,

To do this you have to create tag bind to Raise button. For example name of the tag "Raise". Create Screen ST script OnDataChange type. Bind it to the Popup screen. The content of the script:
if (Tags.Raise==1){
Tags.HOIST_C_Fwd=1;
Tags.HOIST_C_Stop=0;
}
else{
Tags.HOIST_C_Fwd=0;
Tags.HOIST_C_Stop=1;
}

Best regards,
Ruslan
The administrator has disabled public write access.
Go to top