Jump to content
kpetro07

Analogue Temperature sensor 4-20mA

Recommended Posts

Hello all,

this is the first time I am writing to this forum. We were using vision plcs and now is the first time we are using unistream.  

We  have connected the cards through USP-TCP. For the analogue input we are using the card URA-0800O and we set the input 4-20mA.

The sensor we are using is 4-20mA 0-150oC. 

We tried linearization but the output value is wrong.

In X1 we entered the value 818 and X2=4092.

in Y1 we entered the value 0 and Y2=1500 but the output value is 0 and does not change. When we change the Axis values (y1=818,y2=4092,x1=0,x2=1500) in linearization, shows an output value but is 10-15 degrees less than the actual temperature. 

Are we doing something wrong?

Thanks

Share this post


Link to post
Share on other sites

You don't need to use a linearization function block with UniStream. Just set the min and max values in the analog input definition (0 & 1500).

Share this post


Link to post
Share on other sites
26 minutes ago, Flex727 said:

You don't need to use a linearization function block with UniStream. Just set the min and max values in the analog input definition (0 & 1500).

Where? I could not find where to insert min and max values.

Share this post


Link to post
Share on other sites
1 hour ago, Flex727 said:

Go to the Help file. Search on Analog and select Configuring Analog I/Os.

How can I find the window that shows in help file where I can add values for min and max? 

FD8960E6-0030-4121-B3A9-EBDDD66A738F.jpeg

Share this post


Link to post
Share on other sites

Ah, sorry, didn't realize you were using the remote I/O. I guess that's a bit different.To troubleshoot that it would be best to go online and look at the raw value without using the linearization function - no reason to try to troubleshoot two things at once. If the raw value isn't changing, then you need to look at your hardware connections.

Share this post


Link to post
Share on other sites
9 hours ago, Flex727 said:

Ah, sorry, didn't realize you were using the remote I/O. I guess that's a bit different.To troubleshoot that it would be best to go online and look at the raw value without using the linearization function - no reason to try to troubleshoot two things at once. If the raw value isn't changing, then you need to look at your hardware connections.

The raw value is changing. When we try linearization the value is wrong.

Share this post


Link to post
Share on other sites

I think you're setting up the linearization function properly (though X1 & X2 should be 819 & 4095, respectively, but that is inconsequential to this problem). If you can see the actual analog raw value changing appropriately and you have the linearization function set up properly, then the problem must be that the linearization function is not being called for some reason. Make sure the program is downloaded to the PLC and make sure the function is not in a subroutine that's not being called. If you post your program here, someone will try to help troubleshoot your code.

Share this post


Link to post
Share on other sites
14 hours ago, Flex727 said:

I think you're setting up the linearization function properly (though X1 & X2 should be 819 & 4095, respectively, but that is inconsequential to this problem). If you can see the actual analog raw value changing appropriately and you have the linearization function set up properly, then the problem must be that the linearization function is not being called for some reason. Make sure the program is downloaded to the PLC and make sure the function is not in a subroutine that's not being called. If you post your program here, someone will try to help troubleshoot your code.

attached you will find the program. the value is correct for temperatures above 50oC. 

test 2.ulpr

Share this post


Link to post
Share on other sites
1 hour ago, kpetro07 said:

the value is correct for temperatures above 50oC. 

Are you saying that there is still a 10-15° error, but it is only happening below 50°?

Share this post


Link to post
Share on other sites

Basic troubleshooting.  Use a known reference to determine which device is screwed up.

Time to get your loop calibrator out and pump several known current values into the analog input card.  You should be able to calculate what raw values should be for different input values.

This will tell you whether your analog input card is accurate or not.

Joe T.

Share this post


Link to post
Share on other sites

hello,

with the attached program the value is correct and we have not understand why.

Also in  the program, because we will control many valves, we have created user defined function as temperature controller (with function out set and reset for the coil) , but in the main function we do not get output from the user defined function. 

Are we doing anything wrong?

 

test_tempcontroller.ulpr

Share this post


Link to post
Share on other sites

You've defined a UDFB called temp_controllers, using local and function tags.

Local tags are destroyed and recreated every scan, so in the first two networks, you are comparing an input variable ("indicator") to something that hasn't been created yet ("indminus2") and making a decision to set a local output coil.

It's not going to work right in this order.  You must think like the PLC - solve top to bottom, left to right.

image.png.9cbc4c27e7fa9c114c7982ffadba84f4.png

Unless you're going to have a lot of instances of this temp_Controller function I would stay away from UDFBs until you get more comfortable with UniLogic in it's regular form.  Just write ladder code as you normally would.

Joe T.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...