View Full Version : Trying to get a Voltage Out from PID prog.
MikeLB56
November 6th, 2006, 07:39 PM
I am trying to get a voltage output from the analog side car. the Thermocouple we are using is recognized as the program is reflecting readings. We are trying to get a voltage output proportional to the disturbance of the setpoint. We cannot Figure out why maybe this screen shot will help you help me!! THANKSfile:///C:/DOCUME%7E1/Mike/LOCALS%7E1/Temp/msohtml1/05/clip_image002.jpgfile:///C:/DOCUME%7E1/Mike/LOCALS%7E1/Temp/msohtml1/01/clip_image002.jpg
Mickey
November 6th, 2006, 07:59 PM
MikeLB56,
Try again, your screen shot didn't work.
TConnolly
November 6th, 2006, 10:06 PM
Greetings Mike.
We cannot view files that are on your own hard disk.
You will need to upload your image to the PLCs.net server.
1: At the bottom of the post window find the button that says display pictures.
2: Click the browse button in the pop up and browse to the file on your computer. Click OK.
3: Click the upload button.
When your upload is successful a popup window will show you the file name and bbcode to paste into your post.
http://www.plctalk.net/qanda/uploads/AL110606.JPG
MikeLB56
November 7th, 2006, 03:05 PM
ok hopefully this helps....we are very stuck and have been trying for a long time....we need basically a temperature reading from the thermo into the analog and the analog to give us a 0-10V DC output based on the distance from the setpoint....see if you can help me from these pics....i can get more....thanks
curlyandshemp
November 7th, 2006, 03:20 PM
ok hopefully this helps....we are very stuck and have been trying for a long time....we need basically a temperature reading from the thermo into the analog and the analog to give us a 0-10V DC output based on the distance from the setpoint....see if you can help me from these pics....i can get more....thanks
You have the scaled output Min / Max both set to 0. The MAX value should be the MAX value required to give the analog output 10VDC
http://www.plctalk.net/qanda/uploads/scaled1.JPG
MikeLB56
November 7th, 2006, 04:48 PM
Thank you for your time and that pic. It's a little more advanced than what I am now trying.
I've tried to just use SCP blocks to accomplish my short term goal of varying an output (voltage 0-10) with an input signal (thermocouple mv).
I am getting a definate input (changes with heat). Can I take my input and put it directly into my scp block and output it right to my analog output? Or do i need to do something with an N register? I actually tried both, but of late I am taking the input right from the thermocouple module into the scp function (I:2.0), scaling it down to 0-10 and it is registering values (8,6,etc). This would appear to work on the screen, but when I go to measure it with a DMM - nothing. I would like to see physical voltage across the output (O:1.0), but all I see on my multimeter is .016V????
I'm confused... My Analog module is set for Voltage (I checked this several times). Maybe I'm missing how to config the Output so that it would give me 0-10V. Please help.
Thanks in Advance.
curlyandshemp
November 7th, 2006, 06:03 PM
How about you post your application and I will take a look.
The app I posted receives an RTD input to the PID block, the output is sent to an analog output card that uses 4-20ma to control a 3-15PSI control valve to regulate amount of steam in a heat exchanger. Your app is similair
hipoint2
November 7th, 2006, 06:49 PM
I am trying to get a voltage output from the analog side car. the Thermocouple we are using is recognized as the program is reflecting readings. We are trying to get a voltage output proportional to the disturbance of the setpoint. We cannot Figure out why maybe this screen shot will help you help me!! THANKSfile:///C:/DOCUME%7E1/Mike/LOCALS%7E1/Temp/msohtml1/05/clip_image002.jpgfile:///C:/DOCUME%7E1/Mike/LOCALS%7E1/Temp/msohtml1/01/clip_image002.jpg
Is the "analog side car" a analog output module? If you are trying to use a PID I usually first SCP the input with the proper settings then put it in the PID and setup the Min and Max inside the PID and then SCP the output with the proper settings. Why couldn't you setup your PID Min and Max to 0-10.
rsdoran
November 7th, 2006, 06:58 PM
You mention a thermocouple, can we assume you are using a thermocouple card that converts the milliamp signals to analog ma, either 0-20ma, 4-20ma or? You can not directly connect a thermocouple to a regular analog input.
You need to mention what devices you are using so the help can be in detail.
As mentioned you left SCP at zero, there will have to be settings there so the plc will know how to scale the output to match the input.
As mentioned it would be helpful if you offered more information.
MikeLB56
November 7th, 2006, 09:11 PM
the analog module is a 1762-IF2OF2 2 Chan. Input 2 Chan. Output. The thermocouple itself is a type K that reads in mV which represent temperatures. This is connected to the 1762-IT4 4-Channel Thermocouple. That is all I can give tonight. I can get more screenshots and applications tomorrow when I can get back in the Lab. I am a student at Millersville Univ. in PA so my availability of materials is limited.
Thanks so much for your willingness to help. GREATLY APPRECIATED!!!
Mickey
November 8th, 2006, 12:40 AM
If you want to control Temperature then the PID instruction is the way to go. But for testing output pre your request see below.
Below will vary your output without the PID.
Input Configuration : This gives temperature in degrees F
http://www.plctalk.net/qanda/uploads/input.jpg
Output Configuration: This gives 0-10 Volts for 0-16383 input
http://www.plctalk.net/qanda/uploads/output.jpg
Scaling: You can change the input min and input max to suit your needs. Below 0 Degrees=5 Volts, 500 Degrees= 10 Volts
http://www.plctalk.net/qanda/uploads/scaling.jpg
MikeLB56
November 8th, 2006, 08:39 AM
I've tried just about everything now and I am still lacking Voltage output on my analog module. This might be a silly question, but does the 1762-IF2OF2 2 Channel I/O Analog Module require an external power supply in order to output that voltage. I would think the Module would act essentially as a potentiometer. I've even exactly replicated the program that Mickey gave me. Am I missing something right under my nose????? Thanks again
curlyandshemp
November 8th, 2006, 09:04 AM
I've tried just about everything now and I am still lacking Voltage output on my analog module. This might be a silly question, but does the 1762-IF2OF2 2 Channel I/O Analog Module require an external power supply in order to output that voltage. I would think the Module would act essentially as a potentiometer. I've even exactly replicated the program that Mickey gave me. Am I missing something right under my nose????? Thanks again
If you are seeing values outputed to the output register, but no voltage is measured at the card's terminals, then you have a wiring and/or hardware issues. If you see only a value of 0 sent to the output, then its a software and/or configuration problem.
Mickey
November 8th, 2006, 09:07 AM
Post your program. Your .RSS file. (zip it)
What file is the SCP instruction in. If in any file other then Ladder 2
you need to call that subroutine with a JSR instruction ( Jump To Subroutine)
User Manual:
http://literature.rockwellautomation.com/idc/groups/literature/documents/in/1762-in005_-en-p.pdf
MikeLB56
November 9th, 2006, 04:42 PM
How do I get power into the analog module? Is there a physical wiring scheme that I need to be using? If so can anyone post a schematic. I am puting up the program. We are going into the N7 register because we will bee using PID later on. We just took out everything in between. See if you can help me on the program side and physical wiring side.
Mickey
November 9th, 2006, 05:01 PM
Power comes from bus connection
http://www.plctalk.net/qanda/uploads/OutputCountsToProduce_0-10Volts.jpg
http://www.plctalk.net/qanda/uploads/Changed10VoltTest.jpg
MikeLB56
November 9th, 2006, 06:24 PM
I'm sorry Mickey, I don't quite understand what you mean by bus. But from the screen shot you posted, are you saying that I need to take my scaled value(4455), put it in N7:1 and then move it to my output which will give me a relative voltage output? I have tried doing it the other way.
I was putting the input into a move command, moving it to N7:1 and made my input on my SPC block N7:1. Was this wrong or is it essentially the same thing that you did in the above program just reversed?
Mickey
November 9th, 2006, 08:07 PM
Your output card is going to give an output of 0 volts with a value of
0 moved to O:1.0. It will give an output of 10.5 volts with a value of 32760
moved to O:1.0. The reason for this is because you configured the card for Raw/Proportional, 0-10 volts.
My post #11 would also work.
The Bus connector see pic:
http://www.plctalk.net/qanda/uploads/BusConnectorRibbon.jpg
jwright
November 9th, 2006, 08:40 PM
Hi Mickey,
So if I understand you correctly, one would need to use a MOV command/block to place the 0-32760 values to the Output. This will equate to 0-10VDC on the analog module. 0 = 0 and 32,760 = 10.5VDC.
My question is - why won't an SCP command do this? Or will it if the Min=0 and the Max=32760? I see that Mike's post used two SCP blocks. The second one placed the output to O:1.0
Thanks for the clarification - I'm learning too.
John
Mickey
November 9th, 2006, 08:46 PM
Yes the SCP will do this. Have look at post #11.
What Mike realy wants is to control a temperature thru a PID instruction.
But he cannot get to output to work so he is focused on that problem for now.
User manual
http://literature.rockwellautomation.com/idc/groups/literature/documents/in/1762-in005_-en-p.pdf
http://www.plctalk.net/qanda/uploads/DataWordFormats.jpg
jwright
November 9th, 2006, 08:54 PM
Yes - I see post #11 now. Thanks! It looks like Mike was thinking he needed to add an external 10VDC power supply to the module. As I understand you, this is not so. The Bus grabs the voltage from the 1200 unit.
John
kupeyy
November 10th, 2006, 10:40 PM
Ok, a few things: No external power supply is needed and I think your problem is in software.
Your scale block is taking an integer, and scaling it as Min 0 and Max 10. But if you look in the documentation on the analog output module, it accepts a range of 0 to 32760 (or 0 to 16380) to give a voltage of 0 to 10 volts. Scaling the value from 0 to 10 would yield an output of approximately zero. In mikes code, the integer N7:1 (which is scaled from the input) can be used as the output word. As said in previous posts with a Move command.
I would recommend testing configuration/hardware setup to confirm all problems are in software. One easy way to do this is to open the Output Data file, change the radix to decimal and click the number next to O:1.0. Enter 32760 in that address. Put any simple program into the PLC and go online. As long as the program isn’t changing that address, it should keep writing that value to the output and thus give a voltage. Manually changing that number should change the voltage.
That should confirm everything is working correctly. As for the PID block, it seems you can scale the input as you are doing and you should do that first in a rung above the PID block. Then use that Integer as your process variable and then your control variable will be a different integer. That integer should be able to be moved to the output address with no scaling because it should be in the right format. But if you had to scale it do so from 0 to 32760 or 16380 based on your configurations. If the manual method of inserting values worked, then moving that control value into the output address should also work to give you a voltage.
I have never done this or tested it so these things are confident assumptions. If anyone sees things inaccuracies in anything I have said, please point it out.
JK
.