News:

  • June 25, 2026, 08:33:26 PM

Login with username, password and session length

Author Topic: DoMore Drum Write to step number  (Read 12896 times)

pioplastic

  • Newbie
  • *
  • Posts: 7
DoMore Drum Write to step number
« on: August 11, 2014, 02:51:47 PM »
I am working on a program using a DoMore drum command. In DS5, I was able to write the drum step number to be able to go to a step dynamically. The DoMore Designer does not allow writes to drum.step. Is there a way to send the drum to a step number without changing the preset?

Thanks,
Pioplastic


franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: DoMore Drum Write to step number
« Reply #1 on: August 11, 2014, 04:10:36 PM »
All you can do is Jog (via the middle input leg), which lets you go from the current step to the next step.

If you need "random access" of the step number, you might want to look at Stage programming - basically create a new PROGRAM code-block that will emulate what your DRUM did (you could even call the PROGRAM code-block MyDrum).  You have complete control over what steps(stage) can jump to what other steps(stage), even back to itself, auto-resetting the step's(stage's) timer.  Inside $Main, you would RUN the PROGRAM code-block MyDrum, then monitor the MyDrum.Done bit from $Main to know when it finished.

Implement Event Only steps as the Event contact driving a JMP box to the "next" stage
Implement Time Only steps as a Tn TMR, and have the Tn.Done contact driving a JMP box to the "next" stage
Implement a Time and Event step as the Event contact driving the Tn TMRA (Accumulating Timer), and have that timer's Tn.Done contact driving a JMP box to the "next" stage

But in Stage, you can have any Stage JMP to any other Stage, or even SET a stage.  You will need to make sure all your JMP's are exclusive/disjoint since you are emulating a Drum where only one step (stage) is active at a time.  Stage actually allows multiple Stages to be enabled at the same time (you can have "divergent" paths).

Look at the Do-more Designer help topics on Stage (start with Stage Programming Concepts, DMD0502)

pioplastic

  • Newbie
  • *
  • Posts: 7
Re: DoMore Drum Write to step number
« Reply #2 on: August 11, 2014, 06:19:15 PM »
Thanks Franji1,
I was looking for a simpler solution like changing the drum.step register to writable like it was in DirectSoft. Another option would be to load the preset with the desired step number and then reset the drum. The problem with that is the number off rungs to select the proper step would be much more than moving a number into the drum.step register.
pioplastic

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: DoMore Drum Write to step number
« Reply #3 on: August 12, 2014, 11:14:56 AM »
I was looking for a simpler solution like changing the drum.step register to writable like it was in DirectSoft.
In Do-more, the Step Number is read-only.

Quote
Another option would be to load the preset with the desired step number and then reset the drum.
That is do-able, but if it would be complex logic, then I would recommend even more to use Stage.  First, draw the sequence out using blocks and transition arrows on paper.  For complex sequencing, this would be good for documentation purposes anyway.

We utilize basic IEC-61131 Sequential Function Chart diagrams in the Designer Help topics.  It is a great design/documentation tool (not just programming language).  SFC flow migrates well to its Stage program code-block equivalent.

For a good non-trivial example of SFC diagram => Do-more Stage Ladder Logic, look at the Designer help topic CTPLSADD - CTRIO2 Add Entry to PLS DMD0518, Example 1 of 2 (towards the bottom of the topic).  Do not get bogged down in the details of the CTRIO instructions specifically, but look at the SFC diagram and how it maps to Stage instruction inside ladder logic.  Look at the SG instructions, the SG bits (and how their nickname matches the SFC step name), and the various JMP instructions (some JMPs embedded within the various CTRIO's "On Success JMP to Stage ..."; your Ladder logic PROGRAM code-block would just utilize SGs and JMPs).

The Drum instruction is modeled after a mechanical drum controller, with a drum/cylinder with removable pegs to open or close the contact, so it sequences steps in order, no "jumping around".  Stage is good for sequencing also, but not limited to sequencing in-order, so Stage 1 could JMP to 5 different Stages based off 5 different conditions (or even enable multiple parallel stage flows within the same PROGRAM code-block - see SGDIVRG and SGCONVRG; SFC supports this concept also).

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3609
  • Darth Ladder
Re: DoMore Drum Write to step number
« Reply #4 on: August 12, 2014, 06:36:06 PM »
Hmmmm.....I've done this in the past as well.

Would it break anything to make it writeable?

If not, it's not a huge deal as most of the time you don't need to, plus it's not hard to build a drum from scratch.  I've had to do that when porting ADC programs to AB!  (Their SQC blows when compared to a drum -- Kudos Host!).
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

pioplastic

  • Newbie
  • *
  • Posts: 7
Re: DoMore Drum Write to step number
« Reply #5 on: August 14, 2014, 12:00:13 PM »
Thanks for all of the input on this. I do know how to write a drum routine in stage programming and how to create a state diagram. The DoMore drum is a great time saver and easy to edit when needed. I agree with Controls Guy that it wouldn't hurt to make the step register writeable. I have written to the drum step in DirectSoft for many years for alarm conditions and also to skip steps without using multiple jogs.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: DoMore Drum Write to step number
« Reply #6 on: August 14, 2014, 12:06:07 PM »
The "Step Number" in Do-more is not the "driving force" behind the DRUM instruction (like it is in DirectLOGIC), hence, just making it "writable" would not make the steps be "random access"  :-\.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3609
  • Darth Ladder
Re: DoMore Drum Write to step number
« Reply #7 on: August 14, 2014, 07:49:04 PM »
Ah OK, not the same implementation.  Like I said, that's cool.   :)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.