News:

  • June 06, 2026, 11:32:39 PM

Login with username, password and session length

Author Topic: Retentive memory?  (Read 43450 times)

DBen

  • Newbie
  • *
  • Posts: 5
Retentive memory?
« on: March 30, 2009, 12:31:02 PM »
Greetings,

Is there a way to keep counter data retentive through a power cycle of the CTRIO?

Specifically, for encoders?

David

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Retentive memory?
« Reply #1 on: March 30, 2009, 02:15:09 PM »
Yes and no.

We have considered adding retentive memory to the counter, and even prototyped a NVRAM version, but never released it. So, in the CTRIO itself? No.

There is a workaround though. If you publish the counter values into the PLC's retentive memory, you can then use a CTRIO System Command to reset the CTRIO's internal register at startup. Not great, but it works.
"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

DBen

  • Newbie
  • *
  • Posts: 5
Re: Retentive memory?
« Reply #2 on: March 30, 2009, 02:56:30 PM »
Thanks for the tip Bob.

The workaround will be fine for my application.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Retentive memory?
« Reply #3 on: March 31, 2009, 12:36:37 PM »
There is a sample project that does this that gets loaded on your PC when you install DirectSOFT. It is located:

c:\HAPTools\Examples\CTRIOwb2

...and is called: Retentive Current Count.PRJ


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

Tim Reece

  • Newbie
  • *
  • Posts: 2
Re: Retentive memory?
« Reply #4 on: February 13, 2015, 10:27:20 AM »
I am using a D0-06DR with 3 H0-CTRIO2 cards that I need to keep the encoder counts in retentive memory. Is there a means to do this? I have tried the example code in the hxctriom.pdf and it will only work for slot1. The example that Hector from AD gave me does not work for slot 2 or 3.

Tim Reece

  • Newbie
  • *
  • Posts: 2
Re: Retentive memory?
« Reply #5 on: February 13, 2015, 12:11:28 PM »
I have to code woring to do this. Thanks to Hector at Automation Direct.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Retentive memory?
« Reply #6 on: April 15, 2016, 05:35:02 PM »
I know this is an older topic, but I don't have the examples that were posted in this thread already. I have two H0-CTRIO cards in my DL06. I need to retain two different footages (footage on the current set and a totalizer footage for an entire order).
For instance:

So, We have V2402-2403 and V2406-2407 as the registers of my "current raw count" accoring to the example in the manual.

Looking at the System Commands, I have this:

so my simulated retentive counter should look like the following:


Code: [Select]
      SP0                        ------------------
------|  |-----------------------|LD                |--
                       |         |                K4|
                       |          ------------------
                       |          ------------------
                       |---------|OUT               |--
                       |         |             V2424|
                       |          ------------------
                       |          ------------------
                       |---------|LD                |--
                       |         |                K1|
                       |          ------------------
                       |          ------------------
                       |---------|OUT               |--
                                 |             V2425|
                                  ------------------

       SP0                        ------------------  
------|   |------------|---------|LD                |--
                       |         |                K1|
                       |          ------------------
                       |          ------------------
                       |---------|LD                |--
                       |         |                K8|
                       |          ------------------
                       |          ------------------
                       |---------|LD                |--
                       |         |               K80|
                       |          ------------------
                       |          ------------------
                       |---------|WT                |--
                                 |             V2424|
                                  ------------------

       SP1                        ------------------
------|  |-----------------------|TMRF           T0 |--
                                 |        K5        |
                                  ------------------
       T0                           B2530.7
------|ris|-------------------------( SET )------------

     B2424.6 B2424.7                B2530.7      
------|-/-|---|  |------------------( RST )------------


    TA0    K10                    ------------------
------|>= |----------------------|LDD               |--
                       |         |             V2404|
                       |          ------------------
                       |          ------------------
                       ----------|OUTD              |--
                                 |             V2426|
                                  ------------------


I can't seem to figure out where I'm going wrong here. based on the example in the manual, page 8-11.
« Last Edit: April 16, 2016, 03:37:48 PM by Evilbeard »

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Retentive memory?
« Reply #7 on: April 16, 2016, 04:07:23 PM »
Nevermind, I'm a huge doofus. I just realized I'd transposed a number in my last output, that's why it wasn't working properly. I'd been staring at it for hours and I guess my brain was compensating for the transposition, but the PLC couldn't. DOH. Problem solved.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: Retentive memory?
« Reply #8 on: April 16, 2016, 04:24:43 PM »
BTDT. Those are the hardest to find. CTRIOs aren't the easiest though much better in the Do-more. Way much better.

Have you seen those trick questions where the
the objective is to find what is wrong with this
sentence?

I see everyone's typos and mistakes and it drives me crazy. But if I go back looking for them I can no longer find them. It only works first pass, hence I can't easily spot my own.


So, did you spot what was wrong with the second paragraph's sentence?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Retentive memory?
« Reply #9 on: April 16, 2016, 06:03:20 PM »
BTDT. Those are the hardest to find. CTRIOs aren't the easiest though much better in the Do-more. Way much better.

Have you seen those trick questions where the
the objective is to find what is wrong with this
sentence?

I see everyone's typos and mistakes and it drives me crazy. But if I go back looking for them I can no longer find them. It only works first pass, hence I can't easily spot my own.


So, did you spot what was wrong with the second paragraph's sentence?

Double 'the'.
"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

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: Retentive memory?
« Reply #10 on: April 16, 2016, 06:11:22 PM »
Well we expect you and your team to see these. ;D

I'd be embarrassed to admit how many times I didn't get it when it's couched in a trickier puzzle.