Read and Write data from/on CNC Machine Controller


Results 1 to 6 of 6

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

  1. #1
    paraujo's Avatar
    Join Date
    Aug 2018
    Posts
    4
    Downloads
    0
    Uploads
    0

    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
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default 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
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default 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
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  4. #4
    paraujo's Avatar
    Join Date
    Aug 2018
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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?



  5. #5
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24220
    Downloads
    0
    Uploads
    0

    Default 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
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default 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
    Registered
    Join Date
    Dec 2010
    Location
    Canada
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default 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
    paraujo's Avatar
    Join Date
    Aug 2018
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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
    paraujo's Avatar
    Join Date
    Aug 2018
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Read and Write data from/on CNC Machine Controller

Read and Write data from/on CNC Machine Controller