CPT in RSLogix 5000

roxusa

Lifetime Supporting Member
Join Date
Nov 2008
Location
NJ
Posts
988
I am having problems with (invalid expression or tag)
I want to do the following:
Cut_Count[1].ACC
multiplied buy
Read_Data[0]
multiplied by
31.5
divided by
144
Where Cut_Count[1].ACC = My sheet counter accumulate
Read_Data[0] = my web width data in inches
31.5 = my cut length constant in inches
144 to get square feet

I tried several ways and once had it ok but had the multiply - divide wrong so I figured my tags were valid and its not showing me a bracketing error
here is what I thought it should be
(31.5*(Cut_Count[1].ACC*Read_Data[0]))|144

what am I not doing right?
thanks
 
First off, while the SLC & PLC-5 used the pipe ('|') as the division symbol, ControlLogix uses the slash ('/').

Second, What is the data type of your tag Read_Data ? If it's anything other than a DINT[x], Real[x], INT[x], or SINT[x], then that's where your trouble is.
 
It is a Real
I see that if I do
(Read_Data[0]*Cut_Count[1].ACC)*31.5
it is ok so it must be using the wrong divide by sign Ill try that
Thanks for the quick responce
 
Thanks I now know its a "/" not a "|"
For some reason my RSLogix 5000 Is missing the "Instruction Help" it says was not downloaded
 

Similar Topics

This should be a simple one. I'm trying to use a boolean value in a CPT instruction to either add a value or not. This is the statement...
Replies
7
Views
6,318
Hi im going to change addresses in a sample project, so i can use it in a project that my costumer have. In this picture im going to change...
Replies
5
Views
2,235
I was pleasantly surprised to learn that the Micrologix 1400 has the Compute (CPT) instruction available. But my problem is this: The two...
Replies
23
Views
9,452
Hi folks, I'm back again with a new question to you....While testing a code I made, I've noticed something I can't explain. I'm using the CPT...
Replies
2
Views
3,946
I am trying to interpret a compute function in RSLogix 500. This seems like a stupid question but it has me stumped. Maybe someone can help. The...
Replies
3
Views
13,418
Back
Top Bottom