Change button state with macro?

Is it possible to effect the state of a push button in FT View with macros? Or even other buttons. For instance, the user can turn the hydraulics on with a button on the main display. But if the user begins a cycle, and the hydraulics are not already on, the PLC will enable them. I would like, in that instance for the status button of the hydraulic pump to switch to state 1, switching the image to a green border.
 
Is it possible to effect the state of a push button in FT View with macros? Or even other buttons. For instance, the user can turn the hydraulics on with a button on the main display. But if the user begins a cycle, and the hydraulics are not already on, the PLC will enable them. I would like, in that instance for the status button of the hydraulic pump to switch to state 1, switching the image to a green border.

Buttons have an indication connection and a value connection. The indication connection is read from the PLC, so not sure what your delimma is. Hopefully you're not relying on a value which is the actual button control and trying to set that in the PLC outside of the HMI. That's poor practice.
 
Buttons have an indication connection and a value connection. The indication connection is read from the PLC, so not sure what your delimma is. Hopefully you're not relying on a value which is the actual button control and trying to set that in the PLC outside of the HMI. That's poor practice.
Could you be more specific about what is acceptable practice then? Your message is unclear. I'm assigning the bool in the PLC to the button. When it is pressed it sets the bit high to enable the hydraulics. How else would you use a button to enable inputs? Isn't that the entire point? Thanks for the info on the indication value and it's use. I've began reading the manual hopefully this will answer most of my questions.
 
Are you talking about the green outline that shows up when an object has focus or changing the button appearance via the indicator tag (mentioned above)?
I'm talking about the button appearance. In state 0 i have a white button, in state 1 i have a white button with green border. It's a maintained button to enable hydraulics. The hydraulics however can be turned on from other methods in the PLC. If it enables some other way, and the tag the button is assigned to turns high, i would like the button to swap states as if it's pressed.
 
Using the indicator tag should do what you want. It may not apply to your situation, but I've seen the button state not update when it's a toggle button (or set/reset) instead of a momentary on.
 
Could you be more specific about what is acceptable practice then? Your message is unclear. I'm assigning the bool in the PLC to the button. When it is pressed it sets the bit high to enable the hydraulics. How else would you use a button to enable inputs? Isn't that the entire point? Thanks for the info on the indication value and it's use. I've began reading the manual hopefully this will answer most of my questions.

For one, I wouldn't use a maintained toggle button in the HMI, especially one that you are setting/resetting within code also.

Use a momentary and toggle the state of your enable bit in code. Then the enable bit becomes the indicator to the button. And, your code can turn off the enable bit as well which will be reflected by the indicator connection on your button.
 
I would use the output state of the hydraulics for the indicator value tag. With this, the button turns green either it is turned ON from the HMI or by other means in the PLC.

As Robert mention, use a momentary to button toggle the state of your enable bit. Use it in parallel to your other conditions where the hydraulics is to turned ON.
 

Similar Topics

Hello- I have a project where I have 3 buttons that write a value to a register (off/man/auto equals 0/1/2). I want the current mode to highlight...
6
Replies
2,574
Views
Hi everyone, I'm new to VT Scada and currently working on a project to migrate an existing SCADA application from Schneider Machine SCADA Expert...
2
Replies
346
Views
Do I have to actually DELETE it, then put it down again? I just want to change it from a MOMENTARY to whatever type it is that just turns the Bit...
18
Replies
1,267
Views
Hello everyone, I am looking for the best method to automatically trigger an action from my HMI in TIA Portal (WinCC Comfort). My objective is...
9
Replies
663
Views
Hello! I am working on a portion of my program to save job data. I have a button that is labelled "Start Job" and this also starts the data logger...
10
Replies
1,456
Views
Top