News:

  • May 02, 2026, 09:23:03 AM

Login with username, password and session length

Author Topic: DoMore & CTRIO  (Read 21283 times)

ERokc

  • Hero Member
  • *****
  • Posts: 118
DoMore & CTRIO
« on: October 28, 2012, 02:46:08 AM »
I could use help in getting started with Do-More using the H2-CTRIO module. I'm starting from having local PLC training but nothing directly related to Do-More. The instructor is not familiar with it either.  I have programming experience but not with PLCs.

I will be using the CTRIO as a counter making use of the preset tables to locate positions on a panel moving on a conveyor.  I need each preset to step a sequencer to apply one or more of six processes (six bit sequence table) along the panel.

It looks like most of what I have learned thus far in school is obsolete.  I get the general process of ladder logic but as I'm starting to learn DirectSoft5 a pop-up window says something about Do-More. Need I say More?  I was ready to buy a DL-250 and a full version of DirectSoft5.  Saved by the pop-up.

So now there's no counter struct in the ladder logic that represents the CTRIO because it's not processed by the CPU? So how do I get it to step the sequencer?  I do understand how to configure the CTRIO for input but that's all.  Is there a bit set when there is a match in counter and preset?  Can that bit step the sequencer?

Am I on the right track?

BTW, from my perspective it looks like PLC designs have been stuck in the twentieth century.  I could not believe the systems taught in school are using octal and Hex numbers among other forced formatting requirements that didn't make sense.  Host Engineering has brought the PLC into the twenty-first century and not any too soon as I need it now.  I feel the enthusiasm as Doug and Mark do the videos. Doug says there's a CTRIO video planned but I can't wait.   My hats off to everyone at Host that designed Do-More.  Everything Doug and Mark presented in the videos make sense and I'm as excited to use it as they are to offer it.

Thanks, Dave

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: DoMore & CTRIO
« Reply #1 on: October 28, 2012, 02:46:07 PM »
It looks like most of what I have learned thus far in school is obsolete.  I get the general process of ladder logic but as I'm starting to learn DirectSoft5 a pop-up window says something about Do-More. Need I say More?  I was ready to buy a DL-250 and a full version of DirectSoft5.  Saved by the pop-up.

So...the popup worked? Excellent. ;)

So now there's no counter struct in the ladder logic that represents the CTRIO because it's not processed by the CPU? So how do I get it to step the sequencer?  I do understand how to configure the CTRIO for input but that's all.  Is there a bit set when there is a match in counter and preset?  Can that bit step the sequencer?

Am I on the right track?

CTRIOs are natively supported in Do-more, and there is definitely a counter struct...one for each configured resource and one for the module itself. When you configure a CTRIO under PLC->System Configuration->Module Configuration, you assign names to each configured resource. Those names (with an added '$') in turn become structures in the PLC image register...if you created a counter named 'MyCounter', there would be a structure for it called '$MyCounter'. The structure type is specific to the resource configuration.

You can interact with the CTRIO through the structure and through the CTRIO instruction set...all CTRIO instructions are prefixed with the letters 'CT'.

I am going to have to defer further support of your application to one of the other guys. I am getting ready to leave for a week of vacation, and may or may not have internet connectivity where I am going. One part of me hopes so...but the other is hoping not. ;)

BTW, from my perspective it looks like PLC designs have been stuck in the twentieth century.  I could not believe the systems taught in school are using octal and Hex numbers among other forced formatting requirements that didn't make sense.  Host Engineering has brought the PLC into the twenty-first century and not any too soon as I need it now.  I feel the enthusiasm as Doug and Mark do the videos. Doug says there's a CTRIO video planned but I can't wait.   My hats off to everyone at Host that designed Do-More.  Everything Doug and Mark presented in the videos make sense and I'm as excited to use it as they are to offer it.

Well...in defense of octal and hex, there are good reasons for using each, and there was a big bunch of debate about whether we should keep I/O numbering in octal in Do-more. Ultimately sanity prevailed, and we gave you back your thumbs. ;D I will say that hex is invaluable for certain things, and we use it extensively in the development of the PLC. The key for both is in giving you the option of using decimal, octal, or hex as it makes sense to...you choose when. We did that.

In truth, Do-more is the PLC that we...the developers at Host...would want to use of we actually used PLCs. I know that sounds like an odd statement, but here is the thing: most PLC developers don't use PLCs, right? Rather than develop our PLC on the basis of what everyone else did, and what was 'expected', we asked the question of what *we* would want it to do if *we* programmed PLCs for a living. Ironically, that took us down a rather different path than tradition. Time will tell whether it was a good move or not, but my money is on 'yes'. So far, response has been nearly uniformly positive, so we like our chances.

Would love to hear your thoughts as you do your app, with particular emphasis on whether the instruction set simplified the problem beyond what other PLCs would offer. The more feedback we get, the better job we can do in the future. Do-more is just getting started!
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: DoMore & CTRIO
« Reply #2 on: October 29, 2012, 12:05:03 PM »
...So how do I get it to step the sequencer?  I do understand how to configure the CTRIO for input but that's all.  Is there a bit set when there is a match in counter and preset?  Can that bit step the sequencer?...

In Do-more Designer Help, from the Contents, goto --> System Configuration --> Module Configuration --> Edit the Configuration for a CTRIO Module. As you read, what you need to know how to do is Discrete Tables. A discrete table allows you to set some counter input presets and link a CTRIO output to them to fire it in various ways when a preset values is reached in the table.

You would also need to configure the CTRIO output(s) as Discrete on Chx/Fnx (where x is the channel number and function number).

When you've configured the Discrete Table(s) and CTRIO output(s) you want, then in ladder logic you would use the instruction CTTBLLD (CTRIO Load Table) to load the Discrete Table for a particular CTRIO output.

That should get you started.
« Last Edit: October 29, 2012, 12:07:42 PM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: DoMore & CTRIO
« Reply #3 on: October 30, 2012, 01:20:34 AM »
BobO, you must disconnect while on vacation.  If you are reading this before returning, STOP! Work will still be there when you return.

As for Do-More, if my first exposure to PLCs had been Do-More I would not necessarily think it special. I would have expected it to be as it appears, so far. My opinion is formed from almost zero exposure to PLCs. Never the less I like it. It is well documented, has easy to understand descriptions in HELP.  I say that because I don't have to re-read it to understand it. I like the window snapshots in HELP.

I like the entry format of drop down lists and indicators when an entry is valid. It gives instant feedback to progress or the lack of.  I'm impressed.  I'll let you know if I'm not.  I get the feeling I'm not going to find fault with Do-More.

Greg, thanks for your help.  I spent all evening trying to get a CTRIO instruction on the rung.  I discovered CTTBLLD won't acknowledge a device if there is no discrete output configured.  So I configured the output "0" and created a preset table for it.  Noted, got past that hurdle.

Now, I need a CTRIO output that will step a DRUM.  I need the drum to actuate one or more of six devices for each preset position of the counter.  I need the outputs to be timed and not stay on until the next step.  I think the drum table will do that.  Back to the counter output, CTRIO_000.Out0DiscOn should do it, correct?

I think I've broken the ice and a ladder is forming.

A couple of questions. Subroutines, is GOTO same as JUMP?  What is a GOSUB?  Is that your Program Block?

I have my first request.  LABEL need to be a NAME, not number. Can it be?

I'm not getting the sequence right on starting a new Main program when one is in the editor and in the PLC.  Seems like I tried New and New Online and I get the program that's in the PLC or I get a clear ladder but it doesn't see the PLC configuration.  What's the sequence of ending one program and starting a new that's going to replace the on in PLC memory?

Thanks, Dave

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: DoMore & CTRIO
« Reply #4 on: October 30, 2012, 08:16:34 AM »
Thank you for the kind feedback.  We're excited about where we've started and where we can get to.  This leads me into...
A couple of questions. Subroutines, is GOTO same as JUMP?  What is a GOSUB?  Is that your Program Block?
We do not support CALLABLE functions or subroutines YET (i.e. multi-parameter functions you would call from a MATH expression, or user defined ladder subroutine boxes).

However, we do support the concept of PROGRAM code-blocks and TASK code-blocks.  I like to think of PROGRAM code-blocks as another PROGRAM that runs, like $Main (you use the RUN instruction to initiate).  TASK code-blocks have two modes - edge triggered where they run through the code ONCE, then they are done (sort of a subroutine, but they are NOT executed INLINE like a CALL), and the other mode is "interval-based" where that logic can run every 100ms or whatever.  There are some built-in SYSTEM TASKS that run once very 50ms, 100ms, and 1sec ($t50ms, $t100ms, and $t1second).  You would use the ENTASK instruction to "enable" a user task (system task enabling is already handled).

Look in the Help for topic DMD0231 Programs and Tasks Overview, along with all related topic links from there.  That should help.

Here's an online link to that topic
http://forum.hosteng.com/wndm/HTMLHelp1/Programs_and_Tasks/Programs_and_Tasks_Overview.htm

Quote
I have my first request.  LABEL need to be a NAME, not number. Can it be?
Possibly, but the name would still have to be tied to a unique ID.  Beware of over-using GOTO/LABEL, skipping over logic is not normal (especially instructions that have STATE), or re-executing logic is sometimes not good (again, especially instructions that have STATE).  Also, looping (FOR/NEXT, WHILE/WEND, REPEAT/UNTIL) should rarely be used, possibly in a separate PROGRAM or TASK code-block that is doing some well-bounded, well-defined algorithm (e.g. bubble sort).  The Ladder Scan is itself a great big loop, updating I/O every time through the logic.  You want this to be FAST - looping can KILL your scan time (i.e. your I/O update time).  We have some cool architectural features in the instruction set for keeping I/O update times low when you need to do looping (e.g. nested FOR loops in a Bubble Sort), but you rarely do looping in a PLC.

Quote
I'm not getting the sequence right on starting a new Main program when one is in the editor and in the PLC.  Seems like I tried New and New Online and I get the program that's in the PLC or I get a clear ladder but it doesn't see the PLC configuration.  What's the sequence of ending one program and starting a new that's going to replace the on in PLC memory?
This is a sticking point for new people.  There are technically 2 or 3 "copies" of the same "project" at one instance.  The one in the PLC, the one on DISK, and the one you are currently modifying in Designer but have not saved to DISK or PLC yet.

You can start an OFFLINE disk project by doing File->New Project->Offline.  This is when you don't have a PLC available, or don't want/need to associate it with an actual PLC yet.  Make changes, save to disk, File->Open will open that disk project later.  Once you are ready to download an OFFLINE project to a PLC, do PLC->Connect, which will associate that OFFLINE DISK project with a specific Communications Link (and hence a PLC).  You will be prompted during the connection process if you want to utilize the contents on DISK or the contents in the PLC.  Choose the one you want to work with (probably the one on DISK if this is what you started with).

You can also start a new Online project (but this is not an "empty" new project) File->New Project->Online where you select the communications link.  This is more like an "open online project", not really a "new" (empty) online project.  You could technically go THAT route and do a PLC->Clear PLC to create a new (empty) project in the PLC.  You must be careful when clearing PLCs (especially if you have more than 1).

We don't have a good way to clear an OFFLINE project without also clearing what's in the PLC.  If you have a HARDWARE configuration in a PLC that you LIKE, I would do the following:
1. File->New Project->Online
2. Save that project to Disk under a new name.
3. Do PLC->Disconnect
4. Make sure you are in Edit Mode (Ctrl+E to toggle).  In $Main Ladder View, do Ctrl+A (to Select All), then hit the Delete key.
5. Right click on any other code-blocks in the Project Browser and select Remove Code-Block.

If you don't care about saving the LOGIC in your PLC, but WANT TO KEEP your SYSTEM CONFIGURATION in your PLC, you can simply do:
1. File->New Project->Online
2. PLC->Clear PLC Memory
3. UNcheck the System Configuration, and possibly/probably UNcheck Documentation, System RAM, Image Register, and/or Password Configuration.  CHECK Program and Read from PLC after completion.
Hit the Clear! button.

If you don't care about saving ANYTHING in your PLC (e.g. clear CTRIO configurations, etc.), simply do:
1. File->New Project->Online
2. PLC->Clear PLC Memory
(use the defaults), hit the Clear! button.
« Last Edit: October 30, 2012, 08:24:18 AM by franji1 »

Vernon Leeper

  • Full Member
  • ***
  • Posts: 49
Re: DoMore & CTRIO
« Reply #5 on: November 25, 2012, 06:41:05 PM »
(BobO, you must disconnect while on vacation.  If you are reading this before returning, STOP! Work will still be there when you return.) HA Ha, just can't get away can you, My wife tells me this all the time, Don't answer the phone! Yes it will be there when you return, unless your abducted by ailens, and what are the chances of that? Can't help though, got to see whats going on and if you can help then whay not...right?
Give a man a fish and he eats for a day, teach him to fish and he eats for the rest of his life.