RSLogix500 CPT Inst Error msg

gripster

Member
Join Date
Dec 2010
Location
Londinium
Posts
40
Hi All

I am getting a 'Source and Destination may not be an immediate' Error from a CPT instruction, I am using both Floats and Ints in the instruction but writing to a Float.

From the CPT instruction help the destination can be a float but I can't find any help about what an 'immediate' is, writing to the same file perhaps?
My apologies in advance if this is something fundamental I missed on the RA course but I can't find anything about it in the RA course literature.
Cheers!
 
Immediate is a number. "71.682" is an immediate operand.
"F8:24" is an address (SLC/PLC). "My_Tag_Thing" is an operand (Logix/PAC).

What exactly does your instruction look like?

And when doing any calculations with floats, and you have any actual numbers in there, get into the habit of using a '.0' even for whole numbers. That is, don't type "My_Float * 15", type "My_Float * 15.0". Not always necessary, sometimes not even desired, but a good habit to get into until you know exactly where to drop the .0.
 
Thanks for getting back to me.

I am afraid I am still not clear what the problem is

Below is the math I am doing.
( ( ( ( ( 0.04 | N7:1 ) ** 2.0 ) * N7:4 ) | 4.67 ) | ( SQR ( ( ( 43.0 * 3.14 ) * ( F10:10 - ( ( N7:1 | 1400.0 ) | 5.0 ) ) ) + ( F10:4 ** 3.0 ) ) ) ) * 10.0

And I am setting the destination as F10:3 I am using the addresses as per the example in the Help files.

I attach a screen shot of the Instruction if that helps, sorry I had assumed it was the same across the RSLogix software
 
Here is the Math in the CPT Inst with Error MSG, I am sure this is a basic fundamental error but I can't see what I am doing.

Thanks for looking.

CPT Ins.jpg
 
RSLogix500 version 8.2, SLC 5/05 - no error. I cut and pasted directly from your post and created the F10 data file.

I noticed your screen shot post (#5) has a different destination than your written out post (#3). Could you double click on the rung, copy the mnemonics and paste them directly?
 
Last edited:
Hi Bernie

Thank you for your time, my lack of experience showing, I should have posted the mnemonic first time:-

CPT F10:9 ( ( ( ( ( 0.04 | N7:1 ) ** 2.0 ) * N7:4 ) | 4.67 ) | ( SQR ( ( ( 43.0 * 3.14 ) * ( F10:10 - ( ( N7:1 | 1400.0 ) | 5.0 ) ) ) + ( F10:4 ** 3.0 ) ) ) ) * 10.0

The reason it was different was because I had used another rung elsewhere in the program for the screen shot. Beginning to wonder if I can't use the CPT with the Micrologix and I will have to use individual Math Instructions ( I hope not)Using Version 8.3
 
...Micrologix...

That would have been a good thing to know right up front. Which Micrologix are you using?

Only the MircoLogix 1400 supports the CPT instruction. When I pasted the Mnemonic into RSLogix500 for a ML1400 it verified just fine for me.

On a side note, your math expression can be simplified. That will make programming it easier if you are using a ML that cannot support the CPT.
 
Thank you for your responses, I am using the ML1400 and I have configured the Base to analogue in the RSLogix (for the model I am using), RA support are pretty good here so I will try them, like most on here I like to try to resolve the small issues myself by trial/error/dabbling or use a forum for pointers, if its verifying for others it means that I have probably set something wrong elsewhere in the code.
I will remember to post more detail next time.
Once again thank you for the input
 
That would have been a good thing to know right up front. Which Micrologix are you using?

I believe the "CPT" instruction would be grayed out if his processor did not support it.

Post your .RSS file if you can ( zip it first)
 
Changing the processor to Micrologix1400 I now get that error. Still don't know what it is. Knowledgebase doesn't show anything.

A simpler CPT passes. Maybe simplifying into multiple CPT statements? I'll try.
 
Last edited:

Similar Topics

Hi all, I am having a few difficulties with the CPT instruction and getting the dreaded "invalid expression ! Two operands in sequence! ", my...
Replies
11
Views
6,551
So basically i have 2 queries : 1. I have a program file of S7-300 PLC which i want to migrate in RSLogix500.In short i want to convert my simatic...
Replies
14
Views
169
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
543
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
2,002
So i have an allen bradley rack (2080-LC50-24QWB), i have it connected through ethernet. I dont have an offline program so im trying to upload...
Replies
6
Views
689
Back
Top Bottom