Host Engineering Forum
General Category => CTRIO and CTRIO2 => Topic started by: DBen 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
-
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.
-
Thanks for the tip Bob.
The workaround will be fine for my application.
-
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
-
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.
-
I have to code woring to do this. Thanks to Hector at Automation Direct.
-
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: (https://forum.hosteng.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FDjJX6Vo.gif&hash=62220d2d1d7bb41c66051a8e8eae695894de1685)
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: (https://forum.hosteng.com/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F79bAJot.gif&hash=b95fc1116495b63c98cee3f65a4b05023c838cdf)
so my simulated retentive counter should look like the following:
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.
-
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.
-
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?
-
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'.
-
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.