Schneider M221 & SoMachine Basic - ANALOG INPUT SCALING

horvatmiha

Member
Join Date
Jan 2019
Location
MS
Posts
14
Hello!
I am new at PLC programming. I am using TM221CE16R PLC with TM3AI8 analog input module and SoMachine Basic v1.6. I am trying to scale analog input value. I am using 4-20 mA pressure sensor. I managed my wiring so that I get raw values in SoMachine Basic. But I don't know how to scale these values to usable values. My sensor works in range 0 - 16 bar. What is best way to get values? Is it PID function block or multioperand function block using equations to get range 0 - 16?

I will appreciate your help.

Thanks in advance!
 
Hello,

I just started using the M221's and SoMachine but I think you would just need to scale and not a PID unless your controlling something...

They are nice PLC's but so far the documentation has been the down fall, you can find the manual on the link below and it may help, there are a couple guys on this site that can/will help when they check in as they are good

https://www.schneider-electric.com/en/download/document/EIO0000001354/

EDIT: and here is another that may help https://www.schneider-electric.com/en/download/document/EIO0000002475/
 
Thanks. Could you give me some example in LAD language? Could you give me an example with my settings?

Thanks in advance!
 
SoMachine basic is not codesys. Codesys would be Somachine V4.2 or V4.3 and you can't code M221 with them.




On M221 PID's SP and PV default is from 0 to 10000 values (integers)


So you should scale your inputs also to scale 4-20mA = 0-10000.
Scale then logic variables to EU units on panel or scada communications.


Or you can also scale 0-16bar = 0-16000 on logic, but then you shoud also adjust PID's max and minimums so that PID is not expecting 0-10000 as on default settings.
 
Last edited:
HI i am trying to get a gf+ flow sensor signal to Tm3ai8 input module but doesnt seem to work, anyone willing to help me out. the book module is tm221me16r.

the flow meter is signet 8550 and the sensor is rotex 515.
 
There are a number of examples on here regarding scaling indeed I posted one, although as usual there were some derogatory comments search for scale or scaling or analogues should get you somewhere.
For a scaling block I suggest you convert the raw values to a real if the scaling block does not do it (some will). then if you know the raw values i.e. 4ma = 0 20ma = 16384 then these will be the input zero & span or in low in high.
The output zero & span should be 0 & 160 (this gives you effective one decimal
place i.e. 16.0 in integer format ) it depends on what you want to do with the scaled output, some HMI's for display purpose can display integers in real format so even though the value is 0-160 it displays it as 0.0 - 16.0.
Here is a link that might help, however, I'm surprised if somachine does not have a function for it.
http://www.plctalk.net/qanda/showthread.php?t=122987
Note: you will need to ensure the input span is not zero or you will get a divide by zero, either add code to skip it or make sure the span is set as a fixed value rather than from a memory address that could be zero.
 
Last edited:

Similar Topics

Hi all, I've been trying to develop modbus rtu program between uv balasts and plc ı'have 6 slave balast.I am reading fault run voltages etc...
Replies
0
Views
1,189
Hi again all, wondering if someone can help me. I have a programming running on an M221 PLC and I want to capture some analog data to a series of...
Replies
6
Views
6,245
Hello, I need to access the bits from the fire system control panel through RS-485. So, I used Read Var block to read from the panel...
Replies
0
Views
166
Hi, I am stuck with these SE cartridges, I am trying to add a second serial port rs485 to a M221 PLC. What is the difference between TMC2CONV01...
Replies
1
Views
109
I am using a M221 PLC (TM221CE24R) which provides me 1 Rs485 port, which I am already using to communicate with a sensor (Rs485/Modbus). My...
Replies
1
Views
733
Back
Top Bottom