584,805 active members*
5,258 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2018
    Posts
    4

    Question 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!

  2. #2
    Join Date
    Dec 2013
    Posts
    5717

    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.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Join Date
    Mar 2003
    Posts
    35538

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

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  4. #4
    Join Date
    Aug 2018
    Posts
    4
    Quote Originally Posted by Jim Dawson View Post
    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.
    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?
    Last edited by paraujo; 08-15-2018 at 08:44 PM.

  5. #5
    Join Date
    Dec 2003
    Posts
    24216

    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.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  6. #6
    Join Date
    Dec 2013
    Posts
    5717

    Re: Read and Write data from/on CNC Machine Controller

    Quote Originally Posted by paraujo View Post
    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.
    Jim Dawson
    Sandy, Oregon, USA

  7. #7
    Join Date
    Dec 2010
    Posts
    45

    Re: Read and Write data from/on CNC Machine Controller

    Quote Originally Posted by paraujo View Post
    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


    There were more videos with Server API examples, let me know if interested in.

  8. #8
    Join Date
    Aug 2018
    Posts
    4
    Quote Originally Posted by Al_The_Man View Post
    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.
    Hi AI_The_Man, thanks for the contact. After contacting the Fanuc support team, I was told that any controller with Ethernet support would enable the reading of different parameters, including those that I cited above, through a driver called FOCAS (https://www.fanucamerica.com/product...lutions/fasopc).

    Does anybody here have experience with this driver?

  9. #9
    Join Date
    Aug 2018
    Posts
    4
    Quote Originally Posted by my-cnc View Post
    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


    There were more videos with Server API examples, let me know if interested in.
    mt-cnc, thanks for the contact, very interesting your solution, where can I find more information about your system?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •