News:

  • December 05, 2024, 05:20:06 AM

Login with username, password and session length

Author Topic: Analog Input  (Read 15574 times)

PStiles

  • Full Member
  • ***
  • Posts: 31
Analog Input
« 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


b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« 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.
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« 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?
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« Reply #5 on: September 28, 2010, 06:42:55 PM »
Quote
+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.
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« Reply #7 on: September 29, 2010, 09:48:01 AM »
If you have a reading less than 1 volt (you said
Quote
.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.
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« 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 »
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« 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 »
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Analog Input
« 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 »
An output is a PLC's way of getting its inputs to change.

PStiles

  • Full Member
  • ***
  • Posts: 31
Re: Analog Input
« 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 »