
adccommunitymod (AutomationDirect) asked a question.
Created Date: September 27,2010
Created By: edefelic
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I 've got a machine that runs with simple sequence of maybe ten steps or so that I run with the EDRUM instruction using both timers and events. The machine cycles continuously so I have the drum self-resetting. The counter memory is retentive, so I am basically controlling the starting and stopping of the machine with a run relay. (i.e after the machine is stopped, it will start again EXACTLY where it left off.) The machine operator requested to have some control over the timers to be able to tweak the timing on the machine when running different materials. I thought the would be really simple, but I ran into a snag. I decided to use the D06-LCD to provide access to variable registers and place the variables in the EDRUM instruction timers. Well, I come to find out that the EDRUM instruction only accepts constants!! WHY??? So, I rewrote the simple drum sequence as a stage program. Where I run into a problem is controlling the program with the run relay. I want it to behave exactly like drum did. (i.e. after the machine is stopped, it will start again EXACTLY where it left off.) Any ideas? I'm thinking that, if I make sure that all of my timers are retentive, I could put all of the stages into a BLOCK and use the run relay to toggle the whole block on and off with the with the BCALL instruction. Anyone done this before?
Created Date: September 27,2010
Created by: bcarlton
Going back to the EDRUM cna part of the 'Event ' be the timeout of a seperate timer? With accumulating timers they would be retentive. It's a bit of external code but then the presets could be changed.
Created Date: September 27,2010
Created by: edefelic
I didn't think of that. I suppose that I would start each accumulative timer with a comparison statement looking at the value of the Current Step counter associated with the drum, then transition from that step when the timer times out. Then also reset the timer either when the timer times out or when I see that transition has been made or just reset all of the timers at the beginning of the next cycle.
Not very elegant, especially when I can't use the iBOX timer commands. Now I have to deal with converting Decimal input values to BCD as well. It should work, but it kind of defeats the simplicity of the Drum Instruction.
Before I try that, I'm going see if I can get my the Stage Program working the way I want with the accumulative timers and the Block statements. I'm assuming that if I turn a block of stages off that the stage that was active when I turned the block off will remain active when I turn the block back on.
Created Date: September 29,2010
Created by: edefelic
I'm assuming that if I turn a block of stages off that the stage that was active when I turned the block off will remain active when I turn the block back on.
This was a bad assumption. In the manual it states that "When the BCALL is executed it automatically activates the first stage following the BLK instruction. " What I ended up doing was putting all of my stages in one block. I use an input controlled by my run relay in a supervisory stage to toggle the block on and off. In each stage I set a flag to indicate which stage is currently active. In the first stage after the BLK instruction I do comparisons on the flags and jump back to the stage that was active.
In the stages I am using Accumulating Fast Timers TMRAF that reset themselves when they complete. I also had to specify the timers as retentive so that they wouldn't lose their values when the machine power was switched off and on.
It's working well. Actually the LCD Control Panel writes and reads BCD, so DEC to BCD conversion was not an issue. (It was an issue with my last project since the Eaton HMI that I was using only liked DEC.)
One quirk I did notice with TMRAF is that they continue to run even when the stage they are in gets turned off. However, they stop running when the block containing the stage is turned off. Go figure! I solved this problem by placing a the stage (S1, S2, etc. . .) contact on the timer rung within the stage.
I have attached my finished program for anyone that is interested.
Created Date: September 27,2010
Created by: edefelic
I 've got a machine that runs with simple sequence of maybe ten steps or so that I run with the EDRUM instruction using both timers and events. The machine cycles continuously so I have the drum self-resetting. The counter memory is retentive, so I am basically controlling the starting and stopping of the machine with a run relay. (i.e after the machine is stopped, it will start again EXACTLY where it left off.)
The machine operator requested to have some control over the timers to be able to tweak the timing on the machine when running different materials. I thought the would be really simple, but I ran into a snag. I decided to use the D06-LCD to provide access to variable registers and place the variables in the EDRUM instruction timers. Well, I come to find out that the EDRUM instruction only accepts constants!! WHY???
So, I rewrote the simple drum sequence as a stage program.
Where I run into a problem is controlling the program with the run relay. I want it to behave exactly like drum did. (i.e. after the machine is stopped, it will start again EXACTLY where it left off.)
Any ideas? I'm thinking that, if I make sure that all of my timers are retentive, I could put all of the stages into a BLOCK and use the run relay to toggle the whole block on and off with the with the BCALL instruction.
Anyone done this before?