|
PStiles
|
 |
« on: September 28, 2010, 02:06:37 pm » |
|
I am trying to use a temperature sensor that outputs 1 Mv per degree. I have the sensor working on a F4-08AD Analog card on a 440 CPU. I am reading the voltage at the sensor and in data location V3000 and 3100, but the scaling seems to be off. For example at last reading the sensor was outputting 864 Mv and the reading in memory location V3100 is 80. This reading does increase and decrease with the temperature increase seen at the sensor. Would it be possible for someone to take a looka at the program below and maybe see where I went wrong? PLC 440
// Rung 1 // Address 0 STR SP1 LDF X0 K8 BCD LDF X34 K3 OUTX V3000
// Rung 2 // Address 7 STR SP1 LD V3000 MUL K1000 DIV K2200 OUT V3100
// Rung 3 // Address 12 END
// Rung 4 // Address 13 NOP
#BEGIN ELEMENT_DOC "UW0","4096","",""
#END
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #1 on: September 28, 2010, 02:29:50 pm » |
|
Why aren't you reading the value from the input as shown in the manual? If you followed it would be LDF X0 K12.
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #2 on: September 28, 2010, 04:31:43 pm » |
|
Because if I us the K12 value, I do not get the correct result. I receive 921 on V3100.
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #3 on: September 28, 2010, 04:47:11 pm » |
|
OK, leave it at K12.
What is your setup of the analog card?
What ACTUAL voltage is at the first channel terminals?
What is the BCD reading in V3000?
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #4 on: September 28, 2010, 06:26:00 pm » |
|
I am only using channel 1 on this card until I can get this issue resolved. Card is setup for +2 to -2 Voltage with Unipolar. The BCD reading in V3000 is 2311 which is .891 Mv
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #5 on: September 28, 2010, 06:42:55 pm » |
|
+2 to -2 Voltage with Unipolar. I don't see that as an option for the jumpering. The manual is hazy in that it talks about the -2 to +2 but then doesn't mention it anywhere alse. I think either the different parts were written by different people or they only changed one section.
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #6 on: September 29, 2010, 09:31:49 am » |
|
My mistake, the card is setup for 1 to 5 volt input. Misread the manual
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #7 on: September 29, 2010, 09:48:01 am » |
|
If you have a reading less than 1 volt (you said .891 Mv but I'm assuming you mean 891 mv) then a minimum setting of 1 volt wouldn't really work. Try 0-5 VDC settings.
|
|
|
|
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #8 on: September 29, 2010, 10:10:41 am » |
|
Reconfigure card for the 0-5 volt unipolar. The reading in location V3000 is 1648, and the reading in location 3100 is 355. The sensor is at 821 millivolts.
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #9 on: September 29, 2010, 10:23:46 am » |
|
I would expect 672 in V3000 for the 821 mv input. Are you viewing the value in V3000 at the same time that you have meter leads on the input terminal (thinking about meter loading effects.)
|
|
|
|
« Last Edit: September 29, 2010, 10:28:33 am by b_carlton »
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #10 on: September 29, 2010, 10:27:45 am » |
|
Yes meter is connected to the input of the card where the sensor is connected
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #11 on: September 29, 2010, 10:28:44 am » |
|
As a side issue, is 821 mv reasonable for the temperature sensor? Thats 821 degrees according to your first post.
You didn't specify Kelvin, Celsius, Rankine, Farenheit?
Also for 1648 in V3000 you should get 749 in V3100 according to the program in your original post.
|
|
|
|
« Last Edit: September 29, 2010, 10:36:21 am by b_carlton »
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #12 on: September 29, 2010, 10:36:41 am » |
|
The readings are in Farenheit. I just looked at the sensor sheet, the sensor outputs +10mV/°F.
Specs from the data sheet.
For example, a temperature reading of 75.3°F produces an analog signal on T10 of (0.010V/°F x 75.3°F) = 0.753V
|
|
|
|
|
Logged
|
|
|
|
|
b_carlton
|
 |
« Reply #13 on: September 29, 2010, 10:40:27 am » |
|
I looked at your program again. This exerpt:
STR SP1 LDF X0 K8 BCD LDF X34 K3 OUTX V3000
if the module is in the first slot should be
STR SP1 LDF X0 K12 BCD LDF X14 K3 OUTX V3000
the channel bits are near the top of the input word. You are referencing something else in the fourth line I posted.
|
|
|
|
« Last Edit: September 29, 2010, 10:41:59 am by b_carlton »
|
Logged
|
An output is a PLC's way of getting its inputs to change.
|
|
|
|
PStiles
|
 |
« Reply #14 on: September 29, 2010, 10:51:32 am » |
|
I changes my program to reference the changes you suggested. Now V 3000 shows 1652, and V3100 shows 356 the sensor is outputting 828 millivolts.
|
|
|
|
« Last Edit: September 29, 2010, 05:57:27 pm by PStiles »
|
Logged
|
|
|
|
|