Jump to content
Moran

Press a button from Ladder code

Recommended Posts

Hi,

I have a button on the HMI that doing some actions, I want to press this button from the ladder code, how can i address that button?

there is no a link bit like visilogic. Can I address HMI element by using it's name?

 

thanks,

Moran

Share this post


Link to post
Share on other sites

Hello Moran,

 

Are you trying to make the button appear to be pressed via the ladder?  If so, you may want to use a binary image variable instead, and link the action tag to the link for the binary image.  Then you may address the link in the ladder.

 

Please let me know if this helps.

Share this post


Link to post
Share on other sites

hi,

i tried to use a binary image but still does not work as i need,

what i am trying to do is to put a button on the HMI and by pressing it i want to operate another button (or a binary image) that has some actions inits action collection

but it is not working well...

 

thanks for your help.

Share this post


Link to post
Share on other sites
hi,

i attached 2 photos, the first called 1.GIF you can see a button called "Start Simul" that has 1 action (set bit to Start_Simul bit)

the second photo called 2.GIF there is a binary image that link to the bit "Start_Simul" and has 2 actions (set bit and increment )

 

i want to press the Start Simul button and operate the 2 actions in the binary image.

now when i pressed the Start Simul button the binary image change the image but the 2 actions dond work, if i press the binary image directly the 2 actions work.

 

post-8956-0-90086400-1456775484_thumb.gif

post-8956-0-34805100-1456775487_thumb.gif

Share this post


Link to post
Share on other sites

Dear Moran,

 

Please forgive me if I write my opinion in your post; the tags that are shown in the 2.gif (Tpp_on and Tpp_Index) will be "managed" only if button (circular button) will be pressed or clicked (direct action)...if I well understood you want/need that these tags are managed when you press or click the orange square button that already manage the "Start_simul"... this tag will switch the binary image but not the tags linked inside (not direct action).  Then you have to remove the tags (Tpp_on and Tpp_Index) from the grid of circular button and insert the same tags in the grid of orange square button.

I hope that I have not said stupid things...in case, please, forgive me because I am a newbe.

Share this post


Link to post
Share on other sites

hi ORSO2001,

 

what you say it's correct, but it is not what i am trying to do...

now i have 8 binary images (like the circular button) and for each of them i attaced the 2 actions. and when the operator press one of them the actions shuold be work and this is working

but i want to press a button (the orange button) and to activate the 8 binary images automatic (make the 2 actions ) at difference time, first operate the first binary image ,after 10 sec operate the second and so on....but this is not working...

Share this post


Link to post
Share on other sites

Hello Moran,

 

ORSO2001 is exactly correct.  The actions are a touch property of the button, so will only be activated if the button is touched.

 

I would move the two actions from your binary image, and add them to the actions of your Start Simul button, just as ORSO2001 has mentioned above.

Share this post


Link to post
Share on other sites

hi ORSO2001,

 

what you say it's correct, but it is not what i am trying to do...

now i have 8 binary images (like the circular button) and for each of them i attaced the 2 actions. and when the operator press one of them the actions shuold be work and this is working

but i want to press a button (the orange button) and to activate the 8 binary images automatic (make the 2 actions ) at difference time, first operate the first binary image ,after 10 sec operate the second and so on....but this is not working...

Hi Moran,

 

Ok...but in this case you have to "create" a ladder condition, by timer, contact etc...and insert the "set" or "reset" command inside the orange button.

Share this post


Link to post
Share on other sites

Moran, you need to distinguish between the "Tag: Link" and the "Tag: Touch...". The Tag: Link is what will be changed in your ladder to have your button change in appearance. The Tag: Touch is where you define the actions that will occur when the button is touched. Those actions can include Set or Reset of the Tag: Link.

Share this post


Link to post
Share on other sites

hello,

thank you all for your reply, i had a little misunderstanding about the action list at the button properties. i now understand that this actions take place only when you actually touch the screen.

so i moved this actions to the ladder code and now it is working.

 

thank you all again!!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...