p001p

CP1L problems, Negativ temperature

2 posts in this topic

So, hello all. I'm new in Omron PLC.
Using: CP1L-EM controll + CP1W-TS102 (x3)
Problem: I have PT-100 sensor outside, so, cause i live in Russia, we have now -3 ... -5 under 0 =) 
What i've done: I read the manual W462. Made some ladder (attached). 
When i have temperature outside - i have value &2 or close to it, what means 0,2 degrees (i use Celsius)
But when the temperature go down, i have &65535 and my PID go crazy. 
So, i understand that it's 2 complement's but... HOW I CAN GET THE VALUE IN REAL??? (+2,0 or -5,3 and etc....) 

Okay, go across the manual, what we see? (pic2) 
We see the instruction for CP1L with PT-100 in range of -200...650. Ok, perfect, what i need... but... I HAVE NO SBB(051) INSTRUCTION IN MY CP1L! 

So, guys, i need ur help with that. I need negaitve temperature in real with sign for using it in scaling, pid and HMI via NB-series panel. 

 

Sincerely, p001p

Безымянный.png

pic2.png

Share this post


Link to post
Share on other sites

Omron Data Types in the C Series are very rudimentary.

20 hours ago, p001p said:

But when the temperature go down, i have &65535 and my PID go crazy. 

The &65535 tells me you are getting a Signed Integer (INT) from the module. (I didn't read the specs for the card. I'm assuming).

There are 2 things to consider when programming.

1)  How are you interpreting (viewing) the data? In the toolbar there are icons to click to view the data in 3 different forms. Decimal, Signed Decimal and Hex. (See the images below). Hex is the only true form. What you see is what you get. If you know what the data should look like in raw memory then this is the method to determine it. Once you know the type then you can click on Signed or Unsigned to make it easier for the brain.

2)  How are you treating the data? The instruction you choose will determine how it will be executed. There are different instructions for Signed and Unsigned. When inputting constants, take note of the syntax. Preceding a "#" will denote Hex or BCD. A "&" will denote Decimal. To input a negative Decimal just precede a "-".

Omron has a lot of BCD instructions. I stay clear of them since the CPUs have become more powerful. Omron still has them for backward compatibility reasons.

When you get to the PID section, see if the information above will help you. I'm no expert on PID but I've read it is much easier to use the PIDAT instruction. Post back with any questions. There are many here that can help you.

***EDIT for clarity*** Note that viewing the data differently does not change its execution. D2 is 'Less Than' -2 in both images.

MrPLC_UINT_View.jpg.d5f0b99d747dd53ee947MrPLC_INT_View.jpg.25cb6a647c18f62fe5e1c

Edited by IO_Rack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now