Schneider TM221CE16R & SoMachine

Edmhydraulics

Member
Join Date
Apr 2014
Location
Beaumont
Posts
173
Hi all, hope you all had a good Christmas, just working on a project for a customer and am going to be using a TM221 from Schneider Electric. Has anyone had any experience with this small PLC, and its free programming software SoMachine 5.1?

Its not a complex system just a few pulse counters inputs, analog inputs, analog outputs, and digital outputs, with connection via ethernet to a Maple Systems HMI.

Thoughts?
 
SoMachine Basic frustrated me at the start because I was expecting something more like Unity (for the bigger Modicons). It wasn't.

The documentation needs a lot of work.

But once I found my way around it was OK. A few tips:

If you can, scale your analogs in the configuration and don't try and do it with code. Operation blocks are painful.

Set up two scratchpad registers at the start and use these for intermediate values if you have code that has to do lots of math operations. You need to use several operation blocks normally, can't do multiple operators / operands like with Rockwells CPT type instructions.

Plan out your memory word usage. It is not obvious at the start to those without a modbus-centric upbringing, but the doubles, floats and ints all share the same memory space despite appearing to be in different tables. I would plan out some big blocks of memory that dont overlap for each type. I'd do the same for HMI data.

As mentioned the documentation is not good, but a quick google often finds a Schneider FAQ on the subject.

Hardware wise they seem reliable. I've only got a few in service though and not in massively demanding applications yet.
 
Thanks Saffa, any way I could talk you in to writing a simple program with 2 analog inputs sending the values to an HMI via Ethernet? Just to get me started as its a bit daunting jumping in to a new PLC like this.

Thanks.
 
I'm sure I can knock something out for ya.

Not familiar with your HMI though. I'm assuming it can poll a PLC for data using modbus TCP?
 
SoMachine Basic frustrated me at the start because I was expecting something more like Unity (for the bigger Modicons). It wasn't.

The documentation needs a lot of work.

But once I found my way around it was OK. A few tips:

If you can, scale your analogs in the configuration and don't try and do it with code. Operation blocks are painful.

Set up two scratchpad registers at the start and use these for intermediate values if you have code that has to do lots of math operations. You need to use several operation blocks normally, can't do multiple operators / operands like with Rockwells CPT type instructions.

Plan out your memory word usage. It is not obvious at the start to those without a modbus-centric upbringing, but the doubles, floats and ints all share the same memory space despite appearing to be in different tables. I would plan out some big blocks of memory that dont overlap for each type. I'd do the same for HMI data.

As mentioned the documentation is not good, but a quick google often finds a Schneider FAQ on the subject.

Hardware wise they seem reliable. I've only got a few in service though and not in massively demanding applications yet.

This isn't true anymore for newest somachine Basic and firmware. On one operation block can be multiple operations
 
I better do an update then!

Also just noticed the OP is using SoMachine and not SoMachine Basic like I am.
 
Last edited:
Thinking that there is typo on OP's message. M221 PLCs are programmed with Somachine basic not SoMachine V which is totally different programming software.
And is there even Somachine version V5.1 yet?
 
There are quite a few videos on youtube showing how to use basic functions in somachine basic.
 
For me, if the project was going to be a one-off, I would just use a M241/M251 processor and SoMachine 4.1. The hardware cost isn't much more and the programming environment is much easier to use. This is assuming that you are familiar with SoMachine 4.1 and/or Codesys.

One thing that is nice about the M221 is that you can power up the PLC for programming with just the USB cable (can't run any outputs though). This is really handy for getting the initial program installed.
 
Hi guys, I am in the thick of programming this PLC right now with SoMachine Basic and I have a few quick questions. I am using Modbus over Ethernet, I want to send a value from my HMI to my PLC so if I use an Operation Block with a statement like " %QWM4:=%MW4 " would this be correct to put the value from the HMI into Memory Word location 4?

It might seem like a simple questions, but I not used to ladder programming and FB's like these.
 
Sorry but %qwm4 is not a register or physical analog. If this is an analog output it would be something like %qw4.0 depending on the location of the output. Can you elaborate what exactly it is what you are trying to do. I state this again but there are a lot of videos on youtube showing basic programming config etc
 
Chud, actually the videos on YouTube dont cover what I am looking for which is specifically HMI and PLC communication over Ethernet. I am trying to get a variable from my HMI to the PLC, and looking in the program.

Under Configuration in SoMachine Basic, Modbus TCP and Modbus Mapping it says Output Registers (%IWM) and Input Registers (%QWM). So I would assume these would be the registers to send and receive variables to the HMI.

Thanks.
 

Similar Topics

Everything was working fine, but suddenly CPU went into error mode, and the ERR and TER LEDs lit up. Now I can't download or connect with the PLC...
Replies
0
Views
47
Hello all, I am wanting to update the system clock via NTP in the M580/M340. I'm aware that we are able to connect to a NTP in the controller...
Replies
4
Views
141
I am using Schneider elau pack drive servo motor ISH-100. I am facing the problem that On the ISH -100 red light is blinking and pack drive C-600...
Replies
0
Views
71
Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
121
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
200
Back
Top Bottom