News:

  • June 09, 2026, 06:06:13 PM

Login with username, password and session length

Author Topic: H0-CTRIO - accessing internal registers from DL-05 PLC??  (Read 18024 times)

jondecker76

  • Newbie
  • *
  • Posts: 4
H0-CTRIO - accessing internal registers from DL-05 PLC??
« on: September 22, 2008, 03:52:41 PM »
I'm using an H0-CTRIO with a DirectLogic 05 PLC. I have seen in the DL05 manual that there is a RD and WRT functions for access to Intelligent Modules...  What I would like to do is set the following from within my PLC code:

Encoder PPR for channel A and B
Poll frequency for A and B
Smoothing for A and B

It looks like the DL05 PLC with the RD and WRT functionality should be able to do this if I know what addresses in the H0-CTRIO to use.

Can anyone help me with this?

thanks,
Jon

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-CTRIO - accessing internal registers from DL-05 PLC??
« Reply #1 on: September 23, 2008, 09:21:07 AM »
The only registers available using the RD/WT commands in the CTRIO are:
  • Channel 1 Function 1 count
  • Channel 1 Function 2 count
  • Channel 2 Function 1 count
  • Channel 2 Function 2 count
  • Output 0 value
  • Output 1 value
  • Output 2 value
  • Output 3 value

You can, however, use PLC ladder logic to create & edit Preset Tables. But it sounds like what you want to do is merely scale your encoder count so that it makes sense in your PLC program. Is that correct?

Regarding the things you spoke of:
  • "Encoder PPR for channel A and B": There are no parameters in the CTRIO to configure Channel A & B's PPR. The only place in the CTRIO that this would be useful to use is if you want to scale the incoming encoder count and have the CTRIO give you the scaled value in its normal I/O map.
  • "Poll frequency for A and B": The CTRIO doesn't poll these inputs, but merely "watches" for rising and falling edges.
  • "Smoothing for A and B": The smoothing capability of the CTRIO is not configurable from the PLC. In CTRIO Workbench, if you choose to scale your A&B encoder counts, you can manually adjust the "Data Smoothing" by sliding the bar in the dialog between "min" and "max". This is more of a trial-and-error type setting.

Hope that helps!
There are two types of people in the world; those that can extrapolate from incomplete data sets.

jondecker76

  • Newbie
  • *
  • Posts: 4
Re: H0-CTRIO - accessing internal registers from DL-05 PLC??
« Reply #2 on: September 25, 2008, 06:06:16 AM »
OK, thanks for the reply.

I understand that I can change these settings through the Workbench utility. The hope was that I could do the same configuration from the PLC in RLL to make using my solution easier for customers (I.e. if they wanted to switch from a 500 PPR encoder to a 2500 PPR encoder, they could do so and then change the settings from the PLC without having to physically have DirectSoft or the CTRIO Workbench.

I might have mis-used some of the terminology, but what I am trying to access from within the PLC is all in the scaling wizard:
Counts/Unit
Calc Interval (what I referred to as Polling)
Data Smoothing

Could you explain the preset tables you spoke of?


thanks
Jon
« Last Edit: September 25, 2008, 06:18:11 AM by jondecker76 »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: H0-CTRIO - accessing internal registers from DL-05 PLC??
« Reply #3 on: September 25, 2008, 03:57:05 PM »
Sorry :-\, I misunderstood what you wanted. But still the answer is you cannot access the scaling parameters from the PLC.

The Preset Tables are used to control the CTRIO Outputs based on encoder counts. For example if you had the Inputs A&B configured as a "Quad Counter," and the Output 0 as a "Discrete on Ch1/Fn1," then you could create a Preset Table (or tables), that control the CTRIO Output 0 based on the count that is seen on A&B. A typical Preset Table might look like this:

     SET at 2000
     RESET at 4000
     RESET COUNT at 4000

These tables can be created and/or modified from PLC logic. Or you could configure multiple Preset Tables in the CTRIO using Workbench and just load them as you need them. Thus, if the encoder was changed to a different resolution (500 ppr to 2500 ppr), then you could modify the values in the table to compensate for this change, or load a different preconfigured table.

Does that make sense?
There are two types of people in the world; those that can extrapolate from incomplete data sets.