News:

  • August 29, 2026, 03:07:04 AM

Login with username, password and session length

Author Topic: Designer HELP is not indexing articles for CTRIO correctly  (Read 20066 times)

ERokc

  • Hero Member
  • *****
  • Posts: 118
Designer HELP is not indexing articles for CTRIO correctly
« on: March 04, 2013, 09:56:00 PM »
When I select CTRIO in the INDEX tab of HELP I get a list of sub topics.  The articles are not matching the sub topics.  It's like they are not indexed properly.

CTRIO COUNTER does not describe the counter!

Would someone check this out.  I'm trying to learn how to program a CTRIO2 in my machine.

Thanks.

plcnut

  • Hero Member
  • *****
  • Posts: 815
    • premiersi.com
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #1 on: March 05, 2013, 08:20:44 AM »
ERokc, I tried the help in mine and it worked just fine.
Are you running DMD 1.0.2?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
https://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #2 on: March 05, 2013, 08:22:15 AM »
On the Data Info help topic (the one in question, DMD0157), there is a table with an entry containing the phrase "CTRIO Counter", hence why that phrase also showed up in the index.  This is one of those cases where the Index is too complete.

We'll look at it.

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #3 on: March 05, 2013, 01:12:19 PM »
I'm using DMD 1.0.2
I needed to scroll further down the list inder CTRIO.

Specifically I'm looking for the quad counter register of the CTRIO2.  I need to store the count, delay, read the count and compare to see if the conveyor is moving and not jammed.  In this case I'm not using CTRIO2 to run the conveyor, just moving it by a direct value sent to the VFD and looking for HOME sensor. Maybe there is a CTRIO2 function I should use.  I need to trap a stalled conveyor condition in the process.  I suppose I could set a timer for the worst case and if it expired send an error message to the operator.

I'm open for suggestions BUT,  I'm totally new at PLC so be detailed.

Using H2-DM1E.  First code will be to INIT the machine which involves moving the conveyor to HOME.  When it is running parts I will use CTAXTRAP to run the conveyor.  Still need a way to trap for a stalled conveyor.

Went back to HELP and found CTRIO Module Configuration - Configure IO  It's now in my notes of useful info.

$CTRIO_000_C1F1.iReg1 for ch1 func1 which is what I'm using.  This will be the counter value?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6174
  • Yes Pinky, Do-more will control the world!
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #4 on: March 05, 2013, 01:52:02 PM »
$CTRIO_000_C1F1.iReg1 for ch1 func1 which is what I'm using.  This will be the counter value?

There are two input registers from each CTRIO/2 counting/timing function...Reg1 and Reg2. Depending on the CTRIO's configuration the resulting value will be either integer or float. If the value is integer and unscaled (most likely in your case) then you would use iReg1. If you add scaling to the function, then the purpose of Reg1 and Reg2 may change based on the scale type, and the format may also change, necessitating the use of fReg1 and/or fReg2.

"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #5 on: March 05, 2013, 09:11:44 PM »
When I select MOVE inst and select source $CTRIO_000_C1F1 it does not have .iReg1 appended and it does not like my choice. ERROR; Source parameter is invalid. Element is an excluded size.

I look further...... CTREGRD instruction.

I can select
Module Structure = $CTRIO_000
Source Reg = 0-Ch1Fn1 Accumulator

This looks more usable anyway as it sets a bit on completion and error.
On completion I do a greater than compare and branch accordingly.
Pump it every second to see if the conveyor is still moving.

How did I get to $CTRIO_000_C1F1.iReg1? I suppose all this will come easier as I learn more about it.

I just got an on line offer for Do-more training from AD.  I'm going to have to get a little higher on the learning curve before I can use it.  I don't know enough to know what to ask. I have ZERO previous experience with PLCs.  I'm an assembly language programmer, helps a little I guess.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6174
  • Yes Pinky, Do-more will control the world!
Re: Designer HELP is not indexing articles for CTRIO correctly
« Reply #6 on: March 05, 2013, 11:23:14 PM »
When I select MOVE inst and select source $CTRIO_000_C1F1 it does not have .iReg1 appended and it does not like my choice. ERROR; Source parameter is invalid. Element is an excluded size.

$CTRIO_000_C1F1 is the structure associated with channel 1 / function 1 of the CTRIO module located in the local base in slot 0. That is the default name, but it can be changed to whatever you like. Since you referred to the entire structure...and not just the .iReg1 field...it cannot be used in the MOVE instruction. If you want to move the encoder value, you would need to enter $CTRIO_000_C1F1.iReg1.

I look further...... CTREGRD instruction.

You don't need to use CTREGRD. It is for accessing values internal to the CTRIO...which isn't necessary...because the value you need is already contained in $CTRIO_000_C1F1.iReg1. Just use it.

This looks more usable anyway as it sets a bit on completion and error.
On completion I do a greater than compare and branch accordingly.
Pump it every second to see if the conveyor is still moving.

Again...not needed. We already put it there for you...every scan. If all you are need to do is to determine whether the conveyor is moving, add a rate scale to your quad input. Go to the module config page, select your CTRIO's config from the list, select 'Configure I/O...' from the CTRIO config page, then click on the yellow ruler icon in the upper left corner of Function 1. From there, select Rate and take the wizard's defaults. The module will automatically compute the conveyor's velocity in encoder counts per second and put it in .iReg1. In your code, simply compare against 0. When the value in .iReg1 is 0...it isn't moving.

One more thing...be sure to check out the CTRIO monitor dialog. It is accessed at the bottom of the PLC menu, and will show you what fields are available, and give you the fully qualified name for each field.

I just got an on line offer for Do-more training from AD.  I'm going to have to get a little higher on the learning curve before I can use it.  I don't know enough to know what to ask. I have ZERO previous experience with PLCs.  I'm an assembly language programmer, helps a little I guess.

Training is a good thing. Do-more is super powerful...but with that power comes a learning curve.

"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