Writing numerical data into PLC memory, help please

M

Thread Starter

Mihovil Kovacevic

Hello everyone !

I'm an automation student close to graduation and I'm assigned to work with Schneider's PLCs and servo motors for a big college project.

The problem is :

I'm working with a program which exports a text file with numerical values representing robot positions in discrete times. I have to use this data in Unity Pro to operate with two servo motors with Modicon M340.

I was suggested to write data representing these positions from a text file to PLC memory. Then I would make a routine in Unity Pro which would use a pointer on the memory of the PLC and read in which Cartesian position the tip of the robot must be in a certain moment of time. From this position I'd calculate the needed relative moves of the servo motors. The problem is I have no idea how to write a long list of numbers into PLC memory.

An example of how this text file looks like:

1000 1000 1000 1 1.5 1
.
. (couple of thousands of such data sets)
.
xxx yyy zzz a b c

Where x,y and z are Cartesian coordinates of the tip of the robot in real space and a b c are the angles under which he looks in relation to its base.

My questions are :

1) How can a list of numbers from a text file be written into PLC Modicon M340 memory so I can read them and use them with Unity Pro ?

2) I read tons of data over the Internet and on this forum, and if I understand it right, I'd need an OPC server ? There is so much data and products that it's confusing. Does Schneider have their own products which would help me with this ?

3) Could anyone give me a few quick sequential points on how to solve this problem and direct me to some sites or manuals which could help me ?

4) Any opinion or help would be GREATLY appreciated.

With respect and looking forward to some helpful advice,

Mihovil,
FER Zagreb
 
H

Helge Slettvoll

Hi Mihovil,

This sounds like an interesting project!

As you suggest, you will need an OPC-server. But you also need a client program that can read your data text file. Such programs are commercially available, but fortunately some of them come as fully working demos. I have used Softing OPC server together with Cogent OPC DataHub. The Datahub is an extremely powerful and versatile program, and yet easy to use and configure.

Good luck to you!
Regards
Helge S
Norway
 
G

Goran Perger

Hello, Mihovil.

My name is Goran, I have a project with siemens PLC, and matlab nntool. I study at ETF, Osijek. Do you have some material about writing data into memory of PLC?? Can you contact me at [email protected] ??? I need to Implement a neural network into PLC... I hope you will contact me, tnx in advance :)
 
The M340 allows you to store and retrieve files in flash memory. I did look into this for another application and found that file format was undocumented. That is, I couldn't find a way to built a table off-line and copy to the M340's flash memory file system.

A work around to this is to make a structured text routine that populates your look-up table. You can use any text editor or speadsheet program to create a text stream of assignment statements to do this. Run the routine once on first scan. Write a lookup and interpolation function section that accesses the table for use in your main program sections.
 
Top