Jump to content

Recommended Posts

Posted

Hi Experts,

I would like to know is there any possibility to make a switch that can make exponential increment to a data. i know how to make a switch to increment data in fixed intervals with a switch but im trying to make a switch when you press it continuesly it should increase the gains rapidly over time. is this possible and if yes can someone explain me how? im attaching a sample image how i want to make two buttons to increase and decrease a data.

thank you in advance guys.

kind regards,

sathu.

Screenshot 2021-04-21 085354.jpg

Posted

The simplest logic would be something like this:

On First Scan or Button Release set the IntervalofChange to 1.

When button is pressed add IncrementofChange to Variable.

While button is held run a 300ms timer and add Incrementofchange to variable each time it times out and then resatart timer.

When button has been held for 3 seconds change IntervalofChange to 5

When button has been held for 6 seconds change IntervalofChange to 10

When button has been held for 9 seconds change IntervalofChange to 50

Hopefully by now you have the idea.

Posted

Thank you Wizard. im not allowed to make any changes in the PLC Program so im looking for a way to do it only in the HMI interface. looks like its not possible to achieve it through GT designer.

Posted

@sathu not super familiar with GT Designer.  If these are pre-built faceplates you're probably stuck.  If they are individual buttons and you can place scripts to execute from them, then the exponential logic I describe can work in the HMI almost like in the PLC.  Only tou'll need to account for HMI to PLC lag times and fire the increment bit multiple times.

Posted

first you need to define exactly how you want it to behave, then implementation should be straight forward. 

with  HMI/GOT you have several options. preset value could be typed in using keypad for example. using separate increment/decrement buttons or value is another. using single pair of increment/decrement buttons can work too and change increment value or rate any way you like. this would require some programming. one option is to gradually reduce time interval as the button is pressed. when button is released, start with longer interval again.

this allows you to get progressively faster to target value. when you get close, let go and with short presses adjust again till it is perfect.

it's been really long time since i used GOTs so not sure if there is option allowing scripts.

so here is one idea using logic in PLC. any PLC will have free running clock but you can create own one too.

 

and if you cannot touch PLC code... use on screen keypad to enter setpoint value... you can set range limits etc.

preset.png

Posted

thank you so much guys. im not allowed to make any changes in the PLC code. As GOTs allowed scripts trying to make a script to achieve the same function. but im not that expert in coding yet so just giving a try. if i couldnt do it the last plan is setting the screen keypad with range. thanks again guys for the support.

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.   Restore formatting

  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...