S5 Analog Scale problem!!

glasdam

Member
Join Date
Oct 2007
Location
Copenhagen
Posts
2
I need some help to understand this S5 code:



AN F 16.3

JC =M001

L IW 60

SRW 3

L KH 0FFF

AW

FDG

L KG 780

-G

L KG 0.312

/G

T SD 636

L KG 0

>G

JC =M001

L KG 0

T SD 636

M001: ***



What I do know:

Signal: 4- 20mA

Range: 0-5000 hPa

I/O moudel: 1794-IE8 (12 bit on Profibus)

IF F16.3=1 then I/O signal is Ok and the value are calculated to SD 636

IF SD 636 < 0 then SD 636 = 0



My problem is that can’t understand KG 780 and KG 0.312



I can’t replay any questions to day, but I will be back tomorrow.
 
glasdam said:
I need some help to understand this S5 code:



AN F 16.3

JC =M001

L IW 60

SRW 3

L KH 0FFF

AW

FDG

L KG 780

-G

L KG 0.312

/G

T SD 636

L KG 0

>G

JC =M001

L KG 0

T SD 636

M001: ***



What I do know:

Signal: 4- 20mA

Range: 0-5000 hPa

I/O moudel: 1794-IE8 (12 bit on Profibus)

IF F16.3=1 then I/O signal is Ok and the value are calculated to SD 636

IF SD 636 < 0 then SD 636 = 0



My problem is that can’t understand KG 780 and KG 0.312



I can’t replay any questions to day, but I will be back tomorrow.


This must be a S5-135U. KG is the format used to display floating point numbers
 
As curlyandshemp says, KG = Floating point, the FDG instruction converted the input from integer to floating point.

The programmer did the analog conditioning a long winded way as well. What he did as

Code:
 [font=Tahoma]L	   IW 60[/font]
   [font=Tahoma]SRW  3[/font]
   [font=Tahoma]L  KH  0FFF[/font]
   [font=Tahoma]AW[/font]

would normally be done quicker as

Code:
  [font=Tahoma]L	   IW 60
 SLW  1
 [/font]   [font=Tahoma]SRW  4[/font]

that is the most commonly used method to remove the unwanted bits.
 
Thanks for your answer




However this do not solve the main part of my problem the scaling part:
(IW60– KG 780)/ KG 0.312 ; (IW60 modified as you described)
 

Similar Topics

Hello I m using Unity Pro XL. I want to scale my analog inputs. I configured the Analog Input Module as 0-4 mA and 0-10 V . What is the way...
Replies
2
Views
2,983
Hi, I'm using a Micrologix1500 and it doesnt have the SCP (Scale with parameters) block. I have a 1769-IF8 analog module and need read the inputs...
Replies
10
Views
3,742
Hi I'm trying to change the scale in a analog Input module in the module while online. I got a warning saying something like Module changes could...
Replies
4
Views
2,049
I have an automated batching system that im using an analog scale to trigger automated valves to open and close. I have the programming done and...
Replies
6
Views
2,338
Please help me... Is there any possible way to use AB IR4-1762 module for analog input scaling....?
Replies
1
Views
1,173
Back
Top Bottom