News:

  • June 08, 2026, 06:43:32 PM

Login with username, password and session length

Author Topic: Multiple CTRIO Configurations  (Read 25142 times)

ERokc

  • Hero Member
  • *****
  • Posts: 118
Multiple CTRIO Configurations
« on: July 30, 2013, 08:11:28 PM »
I have one H2-CTRIO2 module in my system.
Can I have more than one SYSTEM CONFIGURATION, MODULE CONFIGURATION, CTRIO_000 like another CTRIO_001 and select it from the project run time program?

Before I try this I would like to know if that's possible.

What I want to do is run a pulse AXIS function one time and a preset table another using the same encoder input.  Neither output will use a physical terminal so no hardware change is needed.

The other half of the CTRIO will be used for stepper output and does need the terminal outputs so it's dedicated.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Multiple CTRIO Configurations
« Reply #1 on: July 31, 2013, 01:47:02 AM »
Sorry, no.
"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: Multiple CTRIO Configurations
« Reply #2 on: July 31, 2013, 01:20:27 PM »
So to have another CTRIO module configuration would require another CTRIO module installed to assign that configuration to?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Multiple CTRIO Configurations
« Reply #3 on: July 31, 2013, 01:48:53 PM »
Yes. Or do the VFD control with a math box to free the other two outputs.
"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: Multiple CTRIO Configurations
« Reply #4 on: August 01, 2013, 09:58:42 AM »
What I'm trying to determine is how many functions can the H2-CTRIO2 run at the same time.  It looks like two. I need three. I can control the VFD and an output table but not a stepper w/o feedback.
If that's correct I need to control the stepper w/o the CTRIO.

At this point I don't know if I have to start the stepper at 1Hz and ramp it up or if it will start at a miminum frequency and ramp from there.  Without feedback it must not skip steps.  My application with the stepper is not demanding.  It will move small amounts and the minimum frequency (if there is one) may be sufficient speed for the positioning.  As the machine runs it will periodically be making plus and minus adjustments to a positioner.

I need an opinion from someone that's used steppers controlled with ladder logic.  I may need to post that question elsewhere.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Multiple CTRIO Configurations
« Reply #5 on: August 01, 2013, 10:37:44 AM »
**I have not used steppers**
But I do know that some of the drives A-D sells can be controlled with serial, and that should be easy from RLL. IF serial control is fast enough from your app.
Circumstances don't determine who we are, they only reveal it.

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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Multiple CTRIO Configurations
« Reply #6 on: August 01, 2013, 10:43:25 AM »
The CTRIO has register space for 4 inputs functions and 4 output functions. Discrete output functions only require 1 register set and 1 output channel, pulse outputs use 2 register sets and 2 output channels. You can then have any combination of 4 discrete output functions, 1 pulse output function and 2 discrete output functions, or 2 pulse output functions.

Since you are trying to control a VFD using a pulse output, a stepper using a pulse output, and a preset table on a discrete output, you are over the limit.

It sounds like the only thing you are doing that actually requires the CTRIO is the stepper. The VFD can easily be controlled by the algorithm that has been previously discussed. It didn't sound like you were actually using the discrete output on the preset table, so I'm sure that could be coded in ladder without using the CTRIO.

"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: Multiple CTRIO Configurations
« Reply #7 on: August 01, 2013, 12:01:12 PM »
Quote
It sounds like the only thing you are doing that actually requires the CTRIO is the stepper.

I think just the opposite. I need CTRIO for feedback and scaling for the VFD.  I need CTRIO for the preset table and scaling and compare.  The stepper just needs direction and a number of steps to move based on a reposition requirement as the machine runs.  No feedback needed.  The stepper is installed waiting for DIR/STEP.  Actually there are two of them and initially will run in unison but may need separate control, don't know yet.

I can't get the CTRIO configuration to accept a function without an output assigned.  Like controlling the VFD using an encoder for feedback and OutputVelocity to drive the VFD through a MATH box still has two outputs assigned that I don't use but I understand the registers are still there and part of the configuration.  Positioning with CTAXDYNP is working with the VFD.

Tell me about preset tables.  At this point I'm expecting to use CTRIO for that.  Are you saying I don't need CTRIO for preset tables?  If not that's good as I don't need an output for the table either.  How is that done w/o CTRIO? Somewhere I need to store the table of counter values.  Code needs compare each count with the table and set a bit on equal.  The counter will run at 12KHz max.  How about scaling? CTRIO takes care of that so I need a way to scale.

Keep in mind that what I knew about PLCs a year ago was what PLC stands for and they were used in machines that didn't have dedicated controllers.  I'm still in the learning mode.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Multiple CTRIO Configurations
« Reply #8 on: August 01, 2013, 12:37:55 PM »
I was referring to output functions. Obviously you need the CTRIO for encoder feedback, but that is an input function and is not directly related to the outputs.

There is nothing wrong with using the CTRIO for the things you are wanting to use it for, provided it works, but you are trying to use 3 output functions, but only have resources for 2....so you need an alternative. Conveniently, only 1 of the output functions you require are actually using CTRIO outputs, which means the same behavior can be created elsewhere.

Preset tables are designed to trigger outputs at rates faster than the PLC scan will allow. They were not designed to be a general purpose functions like PLC instructions...they are output functions and that's why you need to attach them to an output. The fact that we report the status of the output in the PLC image register doesn't change their purpose, and the PLC image register value just contains the output status as of the last reporting by the CTRIO...not a real time result. I got the impression that you were trying to drive a drum or something like that, which doesn't sound like it is a) using an output on the CTRIO, or b) requires the high speed of the CTRIO. But you also said that you need to set a bit on a preset match of an input that is running at 12kHz. I'm not sure this is going to do what you want. At 12khz the pulse rate is 83us, much faster than the scan time of the CTRIO. What it can do is to fire the CTRIO's onboard output within +1 scan time of the module when the input is greater than or equal to the preset. What you will see in the PLC is the output status at the greater of the PLC or CTRIO scan time...several hundred microseconds at best. Depending on whether you are content with detecting what has already happened (count passed a preset) or whether you need to do something very close to the time something else happens (fire an output when the count equals a preset) will dictate whether the behavior needs to be internal to the CTRIO or can be done by the PLC. If the PLC will suffice, then you can code the preset behavior there.

While it is possible to use the closed loop pulse output to control your VFD, as you have demonstrated...the function is a *pulse* output. Like the preset function, we happen to be reporting the current velocity for status purposes, but it was not designed to do what you are doing...it is not a VFD motion controller...it is a pulse output. Since you have already proven that the PLC scan time is fast enough to control the VFD, so it is clear that the VFD control function could be performed by logic, hence, you don't need the pulse output function.

So again, the only output function that you are doing that does require the CTRIO is the stepper controller. The VFD control can easily be done by logic in the PLC, and the preset behavior may or may not depending on timing requirements.

"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: Multiple CTRIO Configurations
« Reply #9 on: August 01, 2013, 05:45:55 PM »
Before I decided to use a PLC for this project I tried to find the limits it would impose.  My design is not a precision or particularly fast machine.  I thought a PLC would work and the CTRIO was part of my decision.  To date I have not found any limits to should keep Do-more and CTRIO2 from doing what I want.

In my descriptions I don't give all the details so I will add some here for you to see what I'm expecting.

The encoder input is the 12KHz count.  My preset counts are no closer than 850 counts apart.  I can be off by 100 counts, that's about 8ms.  If the error is fairly consistent and always falls after the compare I can shift for that if it becomes a problem.  I think the preset table will work to step a drum.  It's the DRUM that will provide a column of points, the preset table provides the row of points.  This will create the array of points I need.

Using CTRIO seems to be the simplest way to do those two functions.  I'm pleased with the VFD control.  The only (minor) problem I have with it is coasting past the target.  It typically is 70 counts, not a problem.  I might be able to improve on that but it's good enough as long as I don't discard the overshoot count.  It needs to be included in subsequent moves so it doesn't accumulate error.

That brings me back to the stepper.  It's not demanding either.  I will measure, calculate and determine how many steps need to be made and which direction.  What I don't know at this point is how to deliver the pulses to the motor, ie. if the motor will need ramping.  If I need to ramp the motor what PLC ladder functions would I use?  I have not looked for a solution as I haven't gotten that far.  I'm "cart before the horse" on this part.

I'm very pleased with what's running so far.  Back to running and debugging.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Multiple CTRIO Configurations
« Reply #10 on: August 01, 2013, 05:57:27 PM »
The easiest thing to solve without the CTRIO is the VFD control. Here is what I threw together today...
"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