Hello Guest it is April 16, 2024, 10:12:26 AM

Author Topic: Using a PC to control a DL06 PLC  (Read 6219 times)

0 Members and 1 Guest are viewing this topic.

Using a PC to control a DL06 PLC
« on: February 15, 2010, 12:44:18 PM »
hello Guys,
When in peril I always turn to the knowledge of our beloved group.
I just need some insight on some thing that came to mind and was thinking of how to do it.

Imagine, in a small scale, a pick and place machine, that can go and pick anything from a 3x3 grid, there is a PC as a user interface, where the user selects which item from the 9 on the grid he wants and then the 3 axis + gripper goes to that coordinate and picks the item.

I was thinking of using a PLC to control the pick and place (DL06) with high speed outputs to move stepper motors. I was wondering how can a PC communicate with the PLC, i believe it is through Modbus RTU, and from what I have been reading you can just send a hex string trough the serial port to do this, is this right? for example:

1 06 0001 7D0 9A9B
where 1 is the slave address
06 is the function code to preset a single register
0001 is the #40002 register i want to write to
7D0 is the value of the position i want to sent the pick and place to in the x axis (2000 in decimal, as in 2000 steps)
9A9B is the cycle redundancy check

Am I on the right track?

Then I can send that 40002 register of value 2000 to step counts on the high speed outputs of either the PLC or an expansion module.

Can anyone point me to a good resource for this kind of information?
Best regards
Fernando

Offline kf2qd

*
  •  148 148
    • View Profile
Re: Using a PC to control a DL06 PLC
« Reply #1 on: April 14, 2010, 05:13:56 PM »
you might try a binary encoding scheme. for 9 positions you need 4 bits (allows 16 combinations, of which you will use 9, with zero being a park position ) with zero being a park position, and then another bit to tell it when you have a valid position loaded to start the sequence. A bit back to the PC saying cycle complete, and maybe a bit back to the PC for InCycle.

The other way would be to try ou the Ethernet hardware, would be a bit of expense, but makes it easy transfer more data quickly.

DL06 is a nice brick, Might look into the Omron CP1-H series as having more capabilities, along with the OPC server lite makes for a real smooth way to control things from your PC. Serial or ethernet. Omron will cost more, but you get a lot for the extra cost.

Offline Tweakie.CNC

*
  • *
  •  9,197 9,197
  • Super Kitty
    • View Profile
Re: Using a PC to control a DL06 PLC
« Reply #2 on: April 15, 2010, 04:15:17 AM »
Hi Fernando,

Going off at bit of a tangent to using a PC to control a PLC - Have you considered that Mach is more than capable of performing the operations that you require ?.

This was done just for a bit of fun http://www.cooperman.talktalk.net/towers4.wmv and was of course pre-programmed but there is no reason why extra buttons, or a whole new screen could not be added to Mach with each button programmed (in a similar way to a tool change macro) to go to a specific location and pick up the part. Placing the part could either be by another macro or part of a GCode program etc.

Just a thought.

Tweakie.
PEACE
Re: Using a PC to control a DL06 PLC
« Reply #3 on: April 15, 2010, 11:19:14 AM »
Thanks for the info kf2qd, I will look into it, but the thing is, there are actually more than 500 positions, I think I figured out an easy, not cheap way to do it.

Tweakie, thanks too... Yes I have actually thought about it, that was my first option, In fact I would love it if it would be possible, but sadly i dont think it is, The reasons:

The front end has to be able to change dynamically with the contents of each of the positions, there is also a bit of use of databases, and online databases, and some other peripherals that mach does not handle directly like barcode scanners and stuff like that.

Id love it if we could just code the front end on something else, (java, .net, etc...) to handle the databases and other peripherals, and just call Mach3 for the motion and I/O subroutines, that would be ideal.

Thanks, Best regards
Fernando

Offline kf2qd

*
  •  148 148
    • View Profile
Re: Using a PC to control a DL06 PLC
« Reply #4 on: April 16, 2010, 08:43:40 PM »
If i were doing this i would look at using a little higher level PLC. I have used an Omron PLC and CXserver Lite and was able to write an application in Visual Basic 6 that was able to change settings and manipulate anything in the PLC by just writing to the appropriate registers. I programmed push buttons on the touch screen and was able to reduce my I/O requirements by not needing switches. The Omron PLC;'s that have motion in the CPU are unique in that you can change a motion destination on the fly and it is able to update immediately. It requires you to do some comparisons to tell when you are in position, but is much easier than any other type of motion control I have seen in any other PLC. The CP1-H series connect using USB which is fast and cheap, and doesn't require ant real effort on the programming end.

How many positions would you have to keep track of?

Pete
Re: Using a PC to control a DL06 PLC
« Reply #5 on: April 17, 2010, 09:19:48 PM »
Thanks Pete, I will look into the Omron solution...
I think I have found a suitable way to do this... the Automation Direct inteligent stepper drives, which take serial ASCII comunication and have internal indexer.
There are about 600 positions to keep track of.

Best Regards
Fernando