Read and Write data from/on CNC Machine Controller
I am working on a project where I need to read and write some data from/on a CNC Machine Controller. I still do not have specified a controller, I am trying to understand how I can achieve these objectives. However, I want to read the current position of the Spindle and write the coordinates of a Workpiece Coordinate System (let's say, G54).
My project is written in Matlab, and I am thinking about a Modbus/TCP-IP connection with the machine after some research.
Any thoughts on how I can build this logic? Suggestions regarding controllers and virtual CNC simulators are also welcomed.
Thanks in advance!
Re: Read and Write data from/on CNC Machine Controller
I think the only way that you would have access to that data would be with an open source controller like LinuxCNC, maybe Mach3. I'm pretty sure that getting access to those data registers in any commercial CNC controller would be next to impossible.
Re: Read and Write data from/on CNC Machine Controller
With Mach3 or UCCNC, I would think that a continuously running macro could write the data to a file?
Re: Read and Write data from/on CNC Machine Controller
IIRC in some Fanuc systems there is a series of parameters where the current position can be read, I would have to look it up, it has been a while.
What Fanuc model are you working with?
Al.
Re: Read and Write data from/on CNC Machine Controller
Quote:
Originally Posted by
paraujo
Hi Jim, thanks for your reply, I spent some time reading a Fanuc manual, and I didn't find anything regarding my request. Probably you are right about getting access to those data registers.
The strategy proposed by ger21 (thanks for the reply) would be applied in a commercial CNC controller?
What might be possible would to piggyback an external high speed counter (DRO?) onto the machine encoders and read the position that way. This might work if the machine encoders have enough drive to trigger both the machine and external counters.
Re: Read and Write data from/on CNC Machine Controller
Quote:
Originally Posted by
paraujo
I am working on a project where I need to read and write some data from/on a CNC Machine Controller. I still do not have specified a controller, I am trying to understand how I can achieve these objectives. However, I want to read the current position of the Spindle and write the coordinates of a Workpiece Coordinate System (let's say, G54).
My project is written in Matlab, and I am thinking about a Modbus/TCP-IP connection with the machine after some research.
Any thoughts on how I can build this logic? Suggestions regarding controllers and virtual CNC simulators are also welcomed.
Thanks in advance!
We have Server API in our CNC control software.
You can connect through TCP-IP to CNC controller and get everything you need - Get/Set position, offsets, upload/download/run/stop G-code, run PLC procedures, macros etc.
Here is old demo - connection to myCNC software through telnet TCP socket and play with some commands
https://www.youtube.com/watch?v=kGbhJsCIEA4
There were more videos with Server API examples, let me know if interested in.