Trying to communicate with Modicon M340

biggi

Member
Join Date
May 2012
Location
Reykjavík
Posts
4
Good day,

I'm working on a school project where I wanted to comminicate/control my Telemecanique Modicon M340 with your standart PC desktop. So far everything that we've done has been fruitless, even a basic scan of the PLC gives a zero return.

So far I've defined the ethernet that I'm working on and created a list of "allowed" IP addresses to access the PLC.

What I'm basicly trying to do is just send a signal through my ethernet cable to activate, say %I0.1.0 or %MW1, I've created a word_to_bool where %MW1 will activate a normally open contact on my ladder diagram.

The equipment I'm using is: BMX P34 20302: CPU 340-20 Ethernet CANopen2 and BMX DDM 3202K for the output to my coils that I eventually want to activate.
 
hi Biggi,

How are you attempting to send this "signal"? You need both the right communications driver as well as an I/O server to interface your PLC to common industrial applications.

Lets get some basics first:

Are you programming the M340 with Unity Pro? If so, I take it you can go online to the processor and have actually got this word_to_bool code running in the PLC.

If you are using Unity Pro (and I hope you are!), then let me know. You can implement some basic operator screens with graphics / controls from within Unity, and could use these to manipulate values within the PLC. Look up "Operator Screens" in the Unity Pro help.
 
thanks for your reply Saffa,

we're using a DOS interface of sorts, we've read the memory "locations" and are writing in them. So to make this signal useful I'm using the word_to_bool action, and we made it work. Load of my mind! Tomorrow we're gonna play around with a few more memory locations and see where that takes us.

I do have the Unity Pro, I've been so busy learning how to TCP/IP connecting it that I've not been able to look into the Operators screen, but a million thanks for pointing that out to me, it will make the rest of the design project so much easier. I will not be using the Schneider standard hardwired operating screen, I've got other solutions in mind.

I'll post a picture of my very, very basic ladder diagram when I get back to the office tomorrow. Is there any way to have more than 100 lines of code or will I have to go into the C code direction where I need more than the 100 lines?
 
Good work! Well if you're able to write to the PLC from your own software interface then you've probably got all the tools you need to do just about anything, like build your own HMI if you wanted!

The 100 lines of code limit - I'm not sure where this is coming from? I don't use much ladder in my M340 application (we only have 1 at the plant, the rest are Premium series processors). I prefer Function Block Diagram, but a quick look in my Unity Pro L 5.5 manual indicates:

Section Size

One LD section consists of a window containing a single page.
This page has a grid that divides the section into rows and columns.
A width of 11-64 columns and 17-2000 lines can be defined for LD sections.
The LD programming language is cell oriented, i.e. only one object can be placed in each cell.

What version of Unity are you running? there are lots of different flavours depending on the PLC platforms you want to be able to program. We use L, but this 100 line limitation might be due to your version / licence? The M340 processor is certainly capable of plenty more.
 
Yes indeed, the guy I'm working with is a wizard when it comes to programming and communications. My job is to come up with practical, exciting ideas.

The version I'm using is Unity Pro M v6.0, and it says educational use only. I don't have the premium processor. We're working out of the Reykjavík University, ru.is.

My ladder looks like this http://imgur.com/l0qxo

Probably the 100 lines of code is limited due to my version of the software or something. I don't see the Operator Screen option in my software, can you point me to it's direction? Also, are you using the code option that kind of looks like C-code?
http://imgur.com/l0qxo
 
Right click on the numbers (line numbers) down the side and insert. The LD section just defaults to 100 rungs when you create the section. You can insert rungs whereever you like
 
Saffa, I'm having diffuculty getting a simple ON/OFF sensor switch to work. The modules I have to work with are BMX AMI 0410 and BMX AMO 0210. What I would like to do is to just be able to read wether a contact is open or closed and give me a signal, just 0/1 which I'm going to write into a memory slot, %MW3 etc.

Here's a little album with what I have to work with: http://imgur.com/a/NglvW#0

GeoffC: Thanks dude! didn't even check that option, will look for the default settings now and buff up the orignal value a bit.
 
Saffa, I'm having diffuculty getting a simple ON/OFF sensor switch to work. The modules I have to work with are BMX AMI 0410 and BMX AMO 0210. What I would like to do is to just be able to read wether a contact is open or closed and give me a signal, just 0/1 which I'm going to write into a memory slot, %MW3 etc.

Hi Biggi,

Thanks for the photos, very useful. First problem, you're trying to use analog input modules to read a "discrete" input. the AMI are for analog inputs (0-10V, 4-20mA or 0-20mA etc).

You need to be connecting your ON/OFF switch to the DDM module. I see that breaks out to the ABE7-TES160. i'm not familiar with the ABE7 block, but it looks like it has some switches on the front. either they'll turn the inputs on, or you'd need to bridge from +24V to one of the input terminals. You can find an overview document for the discrete input modules of the M340 on the Schneider website, document reference 35012474K01000.

That's just the external bits - what about the I/O module configuration in Unity Pro, have you got the I/O modules added to your Project?

It might be useful to zip and upload your project file (export it to XEF format) so I can have a look.
 

Similar Topics

Title summarizes the overview of the problem. I am trying to make AVEVA Edge 2020 and a Schneider TM241CE40R to talk to each other via Modbus...
Replies
18
Views
2,083
Need You help... Trying to setup an communication between two PLC's [1756 L61 & 1756 L72 ] thru ethernet EN2T. first i added the EN2T module in...
Replies
6
Views
1,933
Does anyone have experience communicating with the MAGPOWR Cygus Tension Controller thru Ethernet. I have a Controllogix 1756-L73 PLC Version 30...
Replies
25
Views
4,076
I am still learning this PLC stuff, so yeah this is what I got. PLC's I am swapping: 1)On the side FX3U-80MT/ES, On the front 80MT/ES 2)On the...
Replies
5
Views
2,622
Hi all, Got a new device I'm trying to work out how to communicate with. It came along on Monday morning after 9 months of development inside my...
Replies
19
Views
5,708
Back
Top Bottom