Change tag value by holding down button

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
motley
Posts: 16
Joined: Mon Jul 02, 2012 1:28 am

Change tag value by holding down button

Post by motley »

Is it possible to have a tag chnage it's value continuously as long as a button is help down ?

Thanks,

Chris

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Change tag value by holding down button

Post by mark.monroe »

I think you are asking for a momentary button. Take a look at this forum topic on monetary buttons.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

motley
Posts: 16
Joined: Mon Jul 02, 2012 1:28 am

Re: Change tag value by holding down button

Post by motley »

Mark,

Not really, more the other way round.

What I want to achieve is a continuous change to a tag value as long as a button is held down.

I have been asked to provide 'simulations' for values in this manner so I have two buttons marked 'UP' and 'DOWN' (how very original) and I would like to relevant tag to increment in either direction as long as the button is held down.

I know I could use a slider or direct entry - but as I say that's not what's been asked for...

Thanks,

Chris

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Change tag value by holding down button

Post by mark.monroe »

Hi Chris,

You will need to create a timer and a momentary button. The momentary button will start and stop the timer. On mouse down, start the timer and on mouse up, stop the timer. By setting the timer.Interval property you will set how quickly the tag value changes.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

motley
Posts: 16
Joined: Mon Jul 02, 2012 1:28 am

Re: Change tag value by holding down button

Post by motley »

Mark,

Thanks for that - will give it a try...

Chris

Post Reply