sathu

GT Designer exponential increment switch

7 posts in this topic

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I have seen people put multiple up/down buttons, one to inc or dec by 1, one for 10, and one for 100.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now