Sign in to follow this  
Followers 0
Bill Estey

HMI slide switch

4 posts in this topic

Hi Has anyone developed a slide switch control to quickly change a value using an HMI Thanks

Share this post


Link to post
Share on other sites
I don't think it is possible to make a slide control, at least there is no such object in CXD2.1 at present, and there is no object which you can move by touch and link its position to a register value. The closest I can think of is two word or bit buttons, one left "<" which decreases a value in the PLC, one right ">" which increases the value (perhaps with a repeat rate when pressed). A wide horizontal bar in between the buttons as a background, with a coloured square object on top. There is a MOVEPARTS macro command which you could dynamically load the X coordinates of the square according to the increased/decreased register value in the PLC. You could use $SW system memory for the coordinates. A bit lamp outside the screen could have a macro running containing the MOVEPARTS command, with the X coordinate set to a $SW. The bit lamp display bit would be the trigger condition for the macro (execute when ON condition), e.g. a 250ms pulse in the PLC or something like that. This could be fun making!! If only I can find the time....

Share this post


Link to post
Share on other sites
Thanks for the reply I will have to play around with it

Share this post


Link to post
Share on other sites
depending on how many divisions you want you can also work in another way: if it is a limited number of divisions(less than the number of horizontal touch sections) you could set a bargraph and on top of it an array of transparant wordswitches, assigning the value of that you want per position. if you need higher resolution you can only work with the < > or +/- switches and increment based on the internal strobe in a macro on the screen (put a lamp on the screen based on the strobe and connect a macro to it) something like '$W100=Sliding value '$W101=MAX '$B100= + or > '$B101= - or < IF ($B100 = 1 AND $W100< $W101) $W100=$W100+5; ENDIF; IF ($B101= 1 AND $W100 > 0) $W100=$W100-5; ENDIF;

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
Sign in to follow this  
Followers 0