Hello Guest it is April 25, 2024, 04:31:49 PM

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.


Messages - 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 / Re: Read All !!! Stupid Save Function
« on: January 18, 2011, 02:51:15 PM »
Thanks to all for sugeriments.
Now i have two backups of macropump.
And ALWAYS save with Save As.
 :)

3
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. :'(

4
Brains Development / Re: User LED and Brain
« on: September 02, 2010, 02:26:51 AM »
Thank for reply.
Can you explain how you get an terminating comand ULED: *********X
When i select USERLED > USE LED NUMBER ( valid numbers are from 1000-2250) > and hit OK
This command create an OEMLED not ULED.
Exist an another way to get ULED comand?

5
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?

6
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.

7
Modbus / Re: Modbus and PLC S7-200
« on: August 01, 2010, 05:06:23 AM »
Yes, i ticked option for Serial Plugin Modbus in the page port and pins and read the Guide.
 Tested without Serial Plugin Modbus.....same thing, no response.
I dont have TCP connection, so options for TCP Modbus is uncheck.
Modbus Adress for S7-200 are: 00001-09999  ...outputs
                                           10001-19999  ...Inputs
                                            30001-39999 ...Input registers
                                            40001-49999 ...Holding registers
When configuring autopoller Option and writing the value 10001 in Input- Start Register, status field tell Illegal data adress.
But if i make test modbus, the PLC inputs outputs corresponds with actual state.
Sorry for my Eng.

8
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