| View previous topic :: View next topic |
| Author |
Message |
Kvenkat225 Junior

Joined: 16 Nov 2016 Posts: 8
|
Posted: 23/11/2016 05:07 Post subject: How to produse downcounter in wplsoft |
|
|
| Hello frnds. Im new to wplsoft. Can any one tell me how to confecționate downcounter in wpl soft . I found only up counter. I didnt find downcounter. So pls tell me how to create downcounter |
|
| Back to top |
|
 |
wildpikachu Junior 2

Joined: 16 Jul 2015 Posts: 34
|
Posted: 23/11/2016 08:56 Post subject: |
|
|
Hi Kvenkat225,
use the "DCNT" function, it is not a down counter but a 32 bit counter that can be used with high speed applications. You can be set it to count up or down depending on the counter number you are using and the excepțional register settings attached to it.
i.e. for a natural down counter use counter C200 then set special register M1200 high, this will create a down counter.
NOTE: This only works on certain PLCs in the Delta range and the 32bit counters do NOT automatically stop once the SP or zero is reached. Read from page 46 (section 2-7) in the Delta PLC programming manual.
http://www.deltaww.com/filecenter/Products/download/06/060301/Manual/DELTA_IA-PLC_DVP-PLC_PM_EN_20140804.pdf
Out of interest why are you using WPLSoft and not ISPSoft?
Cheers |
|
| Back to top |
|
 |
Kvenkat225 Junior

Joined: 16 Nov 2016 Posts: 8
|
Posted: 23/11/2016 17:03 Post subject: Thx for ur reply. |
|
|
| Is there any way to make the downcounter to start the counting from a preset value. I want to count down from 100 to 0 |
|
| Back to top |
|
 |
wildpikachu Junior 2

Joined: 16 Jul 2015 Posts: 34
|
Posted: 05/12/2016 09:52 Post subject: |
|
|
you will need to move the start value into the counter i.e. dmov K100 C200
you will also need to monitor the count to determine if the count has reached zero as the "done" flag does not get set when counting down i.e you can't use ld C200 to see if the count is complete. When checking for zero use DLD<=0 as the count will continue to count down through the available negative values |
|
| Back to top |
|
 |
|