NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum General General LinuxCNC Questions LinuxCNC for low level stepper motor control?

Welcome, Guest
Username: Password: Remember me

TOPIC: LinuxCNC for low level stepper motor control?

Re:LinuxCNC for low level stepper motor control? 25 Apr 2012 01:17 #19511

  • wizard69
  • wizard69's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 4
You might want to take a different approach. Instead of looking at this as an NC project look at it as an industrial automation project. One approach being to use the PLC functionality of Linux CNC. Another approach might be to write some Python or C code to drive the automation.
As an aside the PLC approach makes for easy programming and debugging of I/O.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 25 Apr 2012 01:50 #19513

  • Smecky
  • Smecky's Avatar
Industrial automation does sound very much like what I'm trying to do. Though I'll take simplicity over features, are there any resources you might recommend to give me a basic idea of the PLC functionality? If I could write C code, that might be advantageous, how might LinuxCNC be made to accept C code?

Thanks Wizard.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 25 Apr 2012 04:37 #19522

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
The PLC Classicladder is included with Linuxcnc and can manipulate HAL pins.

linuxcnc.org/docview/html/ladder/classic_ladder.html

I use Classicladder to control my tool turret on my CHNC lathe.

You might use a mix of Classicladder and G code to control your machine.

You can write a HAL component in C but it is much easier to use comp to create a HAL component.

This is a cycle timer I wrote using comp as an example that might relate to what your doing.

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 26 Apr 2012 17:24 #19569

  • wizard69
  • wizard69's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 4
I see John already responded with info on Classic Ladder which should be very helpful.

As to specific answers about LinuxCNC I can't answer any as I'm new to LinuxCNC myself. My experience though lies in industrial automation. I have a bit of experience with machines that implement what amounts to a CNC controller and a PLC, this on separate hardware. As such I can reccomend implementing functionality in a way that makes sense on the hardware/software you have. In this case I/O a sequential control on the PLC (ClassicLadder) closely linked to CNC code.

While it certainly can be done, I don't reccomend doing a lot of I/O control via NC code. Generally it is better to have that code running independently of the NC code. There are exceptions though, I once worked on a system that had two threads of NC code running. One to sequence hardware, a chuck loader, and another to drive the actual machining operations. These days though it appears that most manufacture prefer to run a PLC process along with the NC process. The idea being to use the best tool for the job. In your case it looks like the NC element is really simple relative to the larger control issue thus the suggestion to control the NC unit from out side of the NC interpreter.

As to getting your code to interface there is most likely multiple possible approaches. That will require going over documentation and some experimentation. However I would start off learning ClassicLadder first as a soft entry into LinuxCNC.
Smecky wrote:
Industrial automation does sound very much like what I'm trying to do. Though I'll take simplicity over features, are there any resources you might recommend to give me a basic idea of the PLC functionality? If I could write C code, that might be advantageous, how might LinuxCNC be made to accept C code?

Thanks Wizard.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 26 Apr 2012 17:29 #19570

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
Hey Wizard,

I do the same thing by day industrial automation...

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 26 Apr 2012 17:46 #19572

  • wizard69
  • wizard69's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 4
That is good to hear! My position can best be approximated as a technician, though jack of all trades might be the common term. Right now we are swamped with work and thus I have little time to pursue some of my interests. I actually need to build a garage or move, setting up a shop in the basement is a bit tight.

The funny thing is I actually have a lot of CNC machinery in the plant almost none of which machine metal. We have CNC based plastic injection molders running FANUC controllers and a packaging machine with an embedded CNC controller. This is why the post originally jumped out at me, using a CNC controller in this way is not impossible or even unusual. It might however be a lot of work for a one off machine compared to a couple of indexing drives and a PLC.

BigJohnT wrote:
Hey Wizard,

I do the same thing by day industrial automation...

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 26 Apr 2012 23:06 #19576

  • marzetti
  • marzetti's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 1
ClassicLadder will also run on embedded platforms (Arduino, etc.) which could be an alternative if you wish to eliminate the PC from the equation: http://sites.google.com/site/classicladder/
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 27 Apr 2012 04:42 #19581

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
Now that would make a tiny PLC for sure.

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 07 Mag 2012 09:06 #19904

  • Zookes
  • Zookes's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Hello! Original Poster here; just unifying some accounts.

I like the sound of PLC, this particular system type has been recommended to me in another forum where I have posted a topic about a new machine build if you'd like to see it:

www.cnczone.com/forums/general_electroni...ion_aventure_uk.html

I'm glad to hear that two of you specialise in industrial automation, as it is becoming clear that is the nub of what I'm trying to do.
I hope my absence hasn't caused you to lose interest in my project!

I'm starting to learn that the stepper control may be the simplest part, as you have said Wizard. If you read the other thread, you may get some insight into my application.

To Marzetti: That's good to know, but I hope to run the control PC remotely, so that I can check performance and perhaps take video feeds as well.
Does the Ubuntu version LinuxCNC is on support virtual network computing? And does ClassicLadder have the ability to write logs to files and respond to sensor events?

Thanks for all the help so far chaps, I can't believe how I was stumbling around in the dark before I came here asking for guidance!
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 07 Mag 2012 09:44 #19906

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
Let me see now Zookes your first post is strange and parts of it make no sense and hijacks another persons thread... Your not Elvis in disguise are you?

Pondering if your a spammer or not...

John
Last Edit: 07 Mag 2012 09:45 by BigJohnT.
The administrator has disabled public write access.
Time to create page: 1.128 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.