RS Logix 5 counter minutes to hours

russrmartin

Member
Join Date
Aug 2002
Location
Eastman, Wisconsin
Posts
744
Hey guys, I am programming in RSLogix 5. I have a 1 minute timer that is triggering a counter to count minutes of runtime. I want to convert this to hours, but when I do the compute block, I keep getting errors. C15:0 0/60 This is my expression right now, and I am not fingering why it won't work. I have tried parenthesis, but nothing works. Can anyone show my how to type in my expression so the block with take it? Thanks.

Russ
 
First you cannot use the "slash" key for division. You must use the "pipe" symbol. This is usually located on the same key as the "backslash". You'll need to hold shift to get it. It will look like a vertical line.

Second, try using C15:0.ACC | 60

OG
 
Another way to do it is to ditch the counter all together.

XIO T4:0/DN T4:0 1.0 60 0
XIC T4:0/DN ADD F8:0 1.6666667E-2 F8:0

Generally for two operand mathematical operations the CPT instruction takes significantly longer to execute than ADD MUL SUB DIV, etc. However, if intermediate result storage steps are required (multiple operands), then the CPT instruction gains the upper edge in execution speed because the processor doesn't spend time writing an intermediate result to memory only to fetch it again for the very next instruction.
 

Similar Topics

I have am trying to determine if I can use a 1756-IB16I (or some dc input equivalent) to handle a 24vdc input pulse frequency of 80 pulses per...
Replies
15
Views
923
I'm converting a Siemens S7-224 PLC application over to CompactLogix. In the Siemens program, 2 HSC inputs were used, so I am setting up four...
Replies
2
Views
1,319
i have a 1769L24 with a high speed counter built in. i need to track distance. what is the best method to keep track of pulses to calculate...
Replies
8
Views
2,893
trying to do division on the hsc:1 value which is on a Long (32bit) word. If I do a divide by 100 and try to put the result in an integer or even...
Replies
9
Views
2,402
Tonight I'm contemplating using a technique I saw the other day while troubleshooting an installation of a legacy machine for a customer of mine...
Replies
9
Views
4,081
Back
Top Bottom