analog scaling problems

sparkotronic

Member
Join Date
Oct 2005
Location
edinburgh
Posts
37
Hi

I'm trying to change a project in my workplace.
I need to replace an existing analog input card with an analog in/output card on a Siemens S300 PLC.

The problem is that the input signal is 4-20mA but the I/O card reads 0-20mA.

Does anyone have any idea of some code that will turn the 0-20 into 4-20 so that I can integrate it into the original program?

Thanks in advance, Colin
 
Have you checked if there are any options in hardware config for the input signal?
I know that the ET200S range of current input cards that I use can be configured for +/-20 or 4-20 mA in the Parameters tab of the module properties.

Phill
 
Code:
      L     PIW  100                    //input scaled 0-20ma
      ITD   
      DTR   
      L     2.764800e+004
      /R    
      L     2.000000e+001
      *R    
      L     4.000000e+000
      <=R   
      JC    zero                        //any value of 4mA or less gives zero
      -R                                //else subtract 4mA
      L     1.250000e+000               //and scale by (20/(20-4))=1.25
      *R    
      JU    op
zero: L     0.000000e+000
op:   L     2.000000e+001               //convert from 20mA
      /R    
      L     2.764800e+004               //back to input bits
      *R    
      RND   
      T     MW   100                    //value for an input scaled 4-20mA
 
Code:
      L     PIW  100                    //input scaled 0-20ma
      ITD   
      DTR   
      L     2.764800e+004
      /R    
      L     2.000000e+001
      *R    
      L     4.000000e+000
      <=R   
      JC    zero                        //any value of 4mA or less gives zero
      -R                                //else subtract 4mA
      L     1.250000e+000               //and scale by (20/(20-4))=1.25
      *R    
      JU    op
zero: L     0.000000e+000
op:   L     2.000000e+001               //convert from 20mA
      /R    
      L     2.764800e+004               //back to input bits
      *R    
      RND   
      T     MW   100                    //value for an input scaled 4-20mA


good idea
 

Similar Topics

im using a slc 5/03 and the SCP instruction. i am trying to set up laser triangulation displacement sensors and it doesnt seem to be scalling...
Replies
6
Views
2,189
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
630
Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
937
I’m trying to perfect the HMI interface for analog configuration. I’ve provided the user the same options for all analog inputs, as follows...
Replies
10
Views
1,677
Hi I have a modicon 984 with proworx 32 that is scaling an analog input, and I need to adjust the scaling. I have new analog input values and %...
Replies
3
Views
1,729
Back
Top Bottom