PLUS+1 User Forum

PLUS+1 Tools => PLUS+1 GUIDE => Topic started by: tjozmin on October 13, 2010, 06:45:56 PM

Title: Up/Down Counter Step
Post by: tjozmin on October 13, 2010, 06:45:56 PM
Using the Up/Down Counter function is it possible to change the step size? Or will it only increment/decrement by 1?
Title: Re: Up/Down Counter Step
Post by: Thomas on October 21, 2010, 02:32:55 PM
No it is only possible to increment in steps of 1.

You could use a scale perhaps after the up/down counter.

If you highlight the up/down counter in the component tree and press F1 the manual will open, if you then click on the picture of the symbol in the manual you can see examples of how it is working.

Please let me know if you have further questions.
Title: Re: Up/Down Counter Step
Post by: Quax76 on November 03, 2010, 11:03:49 AM
Hi tjozmin,

concerning to which functins of the up/down counter you need, you simply could program your own one.
I always use a self programed scs file in my display applications for adjusting some values. This block is also time depending. This means, the longer you hold the up/down button, the greater is the increment/decrement value.
Title: Re: Up/Down Counter Step
Post by: Rafal_Typiak on November 10, 2010, 09:47:37 AM
Below is a little something I cooked up on the fly when I've read your message. I won't be hold responsible if it's gibberish, as I haven't tested it (I only compiled it).

(http://img152.imageshack.us/img152/7561/image2as.jpg) (http://img152.imageshack.us/i/image2as.jpg/)

The way it 'should' work is that you use buttons 1 and 2 on the display. In my case they give out a 'true' signal as long as they're pushed. If out press on or the other than you start the generators which increment the value - thus leading to increasing or decreasing the output value respectively. You should bare in mind two things though:
1. you are limited to a output value of 255. This piece of code does not recognize an overflow - but that can be easily changed with a simple 'compare' block :)
2. it will go bananas if you press 1 and 2 at the same time (or it will just go with '1' command as it's higher on the block diagram) - but that can also be changed.

Thanks to w nice compiler, the start values are always set to 0 at the beginning of the program loop, so you don't have to worry that you'll get some crap at the beginning. But if you want to be extra sure, you can alway force all values to 0 at the first program loop.

Be aware that this is only a simple demonstration of how it can be done. Now depending on what you really want from it, is should be changed accordingly. For example you would want the counter to return to value '1' after you release the button. And so on. Hope it helps you.

Best regards,
Rafal

Title: Re: Up/Down Counter Step
Post by: BetterAdapted on November 19, 2010, 01:24:50 PM
try this - do prime your control value

(http://i1094.photobucket.com/albums/i455/BetterAdapted/Image1.gif)


Images are getting resized here!

http://i1094.photobucket.com/albums/i455/BetterAdapted/Image1.gif (http://i1094.photobucket.com/albums/i455/BetterAdapted/Image1.gif)



Title: Re: Up/Down Counter Step
Post by: Stefan on November 19, 2010, 03:53:33 PM
Hello,

This version has got a preset function (can also be used as reset of course).

(http://www.sauer-danfoss-plus1.com/Themes/Sauerdanfoss/images/Forum_Replies/Counter.bmp)


Best regards
Stefan
Title: Re: Up/Down Counter Step
Post by: BetterAdapted on November 22, 2010, 09:53:43 AM
thats what my real one looks like - i apply signed adjustment values - lol - wanted to keep it simple - Used on deadband control system
Title: Re: Up/Down Counter Step
Post by: jsaluk on November 25, 2010, 06:45:37 PM
To get an output with steps larger than 1, I multiply the count by the step amount.  For example, when I want steps of 10, I multiply by 10.  Good for setting rpm, valve currents etc where small steps are of little value