Hello Guest it is April 18, 2024, 11:18:25 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ianion

Pages: 1
1
Modbus / S7-200 modbus connection example
« on: January 18, 2011, 06:39:17 PM »
Hi all.
First, sory for my eng.
Finaly i have 10 min. free time to share my story about connecting mach3 with PLC Siemens S7-200 series Cpu.
The Modbus work, i dont write great because (probabli with bad seting or somthing else) the communication response is slow. From my point of sight.
If someone has a idea or experience, pleas post it here.
First what you need.
- a Siemens PLC (i have S7-222 CPU, with EM233 module16in-16out and analog module 4in-1out). I recomend a S7-224 because has two communication
 ports buit in. Then the troubleshooting is easy with Step7 and modbus runnig at the same time.
-Software for programming PLC Step7 micro/win
-you need to buy a MODBUS Lybrari and install it to Step7, or write a new modbus program. (Its not so easy)
 here is the instaled lybrari

-A RS232 to PPI converter. I have one from China (with optoisolation)
-Mach3  :)
 First set the modbus parameter in PLC programm, Execute this block only on first scan.
 here is an example

 These al seting here mus correspond with serial port setting in control panel in PC and mach.
 Look at HoldStart parameter. (here tel you PLC where is the start of holding registers, in this examle start at VW800 and parameter MaxHold
 tell how long this registers wil be 100)
 The baud rate is set to 115200, look at maximum baudrate of your converter!
 Then insert in main PLC program a Modbus slave function and execute it every scan.
-Some months i proved ten numbers of setting but without stable connection. This one is stable but with some strange things.
 Here is Modbus setting in mach3

The one of strange thing is when you change the #Registers in Input or Output block the connection fail.
 When you change the start register the connection fail. So these is the only working setting. (for my case)
 Again, post your experience.
 I write an overwiev of input output here is:

The Input and output in green are the wirtual input output and are not present in Hardware modules. Its used only for program communication.
The other strange thing, (weeks of testing ;D) is that when you go to Modbus test the CPU input- output dont work. But only the CPU I0.0 to I0.7 and
Q0.0 to Q0.5. Why? i dont know. All input and output work great.
The holding registers start from VW800 ( in this case) and mach adress is 64
Here is short macro example how to read the values:

For all error posted here i apologize.I am only an begginer.




2
VB and the development of wizards / Read All !!! Stupid Save Function
« on: January 14, 2011, 04:51:06 AM »
 Dont make the same mistake as i.
-Edit your macropump file
-Edit your macropump file
-Test your macropump file
...repeat this 300 x
-Close Mach3 VB Script editor
-Make new macro
-Open Mach3 VB Script editor ( The file is not saved yet, its new blank file )
-Save
-?
-?
-Piiip
The new blank macro file has a name macropump.m1s
-?
-?
All 6 months work is gone, Great
Dont make the same mistake. :'(

3
Brains Development / User LED and Brain
« on: September 01, 2010, 03:36:56 PM »
 Hi,
I write a smal brain rung. If modbus input goes high, invert signal, then activate OEMLED:1200
From terminating window i select USER LED - - USE LED NUMBER - - and write value 1200 (valid value for this 1000-2255)
In BrainControl - -ViewBrain, the value of OEMLED:1200 is high.
The problem is. I have created a led in Screen4 and ticked in table LED CONTROL the OEM CODE FUNCTION  and write value 1200.
Save...bla,bla.
Launch Mach3.... and the led is dead.
What i make wrong?

4
FAQs / Homing and limit sensors
« on: August 01, 2010, 05:22:51 AM »
Hi everione, This week i starting with motor tunig,homing...ect. I have the homing switch and X+ and X- limit switches. When making a ref X, and hiting the limit switch,
for testing the securiti, the axis is stil moving for search home switch. Any Idea how make the limit switches working when Homing? Thank.

5
Modbus / Modbus and PLC S7-200
« on: July 31, 2010, 06:22:41 PM »
  Hi. I have probrem with modbus. All settings on modbus comunication are OK. Because when i make test modbus a actuali can read a switch connected to PLC input. And
all outputs on PLC when changing state, also change on modbus test page.
The problem is that when i make a simple brain program, to activate a button start on mach screen, there is no response. Tested all modbus input posibiliti with no sucess.
Can i use the brains or its necessari using VB scripst?
Have someone experience with interfacing PLC S7-200?

Pages: 1