585,712 active members*
4,286 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Outputting Common variable values into a program
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Join Date
    May 2008
    Posts
    157

    Outputting Common variable values into a program

    Hi,

    Does anyone know how to Output Common variable values into a program (with automated new program number OR an existing program itself) within the CNC memory ?

    Thanks

  2. #2
    Join Date
    Feb 2006
    Posts
    1792
    Do you want to use the value of a common variable inside a program or want to print the values calculated in a program through RS232?
    The first requirement is no big deal. If #500 contains 1.0, G#500 is equivalent to G01, and so on.
    Use DPRINT for the second requirement.

  3. #3
    Join Date
    May 2008
    Posts
    157
    I want to print the values into another program and not into RS232. This way i can transfer the program into my dataserver / flashcard / computer for further analysis. My machine is not connected through RS232 but is connected through Ethernet.

  4. #4
    Join Date
    Dec 2008
    Posts
    5
    It looks like you don't really want to use variables, you want fixed a fixed program using values based on some variables that will not change during program running. This is much easier to do on your PC. Use "replace all" feature in your text editor to replace the variables with their desired values. As long as you keep your original macro program you can create as many fixed programs with different values as you want. You will lose your flexibility though, these programs will be "hard wired" for a specific set of values.
    If the variables actually change during the program I am not aware of any method to extract the program that was created on the fly.

  5. #5
    I'm not really 100% sure what you are trying to achieve, but if you are looking to extract data from a Fanuc CNC, look on this site. CNC Data LTD – CNC Data Collection and Monitoring Software | We can get any data out of CNC machines using ethernet connections and software such as Fanuc Focas

    They can help you.
    CNC Mate
    www.cncmate.com

  6. #6
    Join Date
    Feb 2006
    Posts
    1792
    Use permanent common variables instead of common variables. A permanent common variable remains available to all the programs, even after a power cycle, and any program can change their values.
    Actually, it is not very clear what you want to do, and why?

  7. #7
    Join Date
    May 2008
    Posts
    157
    I' am very much using the permanent common variables to monitor cycle times of the programs that run for a particular component.

    These values are reset whenever a new component is machined. My idea is to output the variable values into a program so that this program can be downloaded onto the computer and then analyzed as well as for easing of data entry.

  8. #8
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by yaji63 View Post
    My idea is to output the variable values into a program so that this program can be downloaded onto the computer and then analyzed as well as for easing of data entry.
    Not possible. The only way that you are going to get the values of the common variables or any type of variable "local" or not is going to be by sending them out via DPRINT function. Well at least on any Fanuc that I have worked on.

    What model Fanuc are you using?

    Stevo

  9. #9
    Join Date
    Feb 2006
    Posts
    1792
    I heard somebody commenting that through ethernet one can have access to any CNC data. I do not know if the statement is true for variables also.

  10. #10
    Join Date
    May 2008
    Posts
    157
    Quote Originally Posted by stevo1 View Post
    Not possible. The only way that you are going to get the values of the common variables or any type of variable "local" or not is going to be by sending them out via DPRINT function. Well at least on any Fanuc that I have worked on.

    What model Fanuc are you using?

    Stevo
    I' am using Fanuc 0i-MD which is supposed to be the latest among the 0i controllers. They claim that it has most features of 18i incorporated into it except for the true multi axis capabilities and some the HPCC options. I was only hoping against hope that i will find an alternative method to DPRINT.

  11. #11
    Join Date
    May 2008
    Posts
    157
    Quote Originally Posted by sinha_nsit View Post
    I heard somebody commenting that through ethernet one can have access to any CNC data. I do not know if the statement is true for variables also.
    I have also heard that Fanuc themselves have a software which when connected through Ethernet can give access to the CNC Data. I have asked for details and yet to receive a reply from them. And being Fanuc it will not be anything cheap at all

    I have tried accessing data myself through this Focas 2 Ethernet but they Fanuc disables it when using in conjunction with a data server and thats the najor problem. Having one option ends up disabling another one !

  12. #12
    Join Date
    May 2008
    Posts
    157
    Quote Originally Posted by Fanuc Mate View Post
    I'm not really 100% sure what you are trying to achieve, but if you are looking to extract data from a Fanuc CNC, look on this site. CNC Data LTD – CNC Data Collection and Monitoring Software | We can get any data out of CNC machines using ethernet connections and software such as Fanuc Focas

    They can help you.
    I cant get a proper brochure for the software on the site which explains how exactly it works on Focas ethernet protocol. Our machine has a data server with it and i understand from Fanuc manuals that the Ethernet on CNC memory does not work when Dataserver is present on the machine. Has this software overcome that issue ?

  13. #13
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by sinha_nsit View Post
    I heard somebody commenting that through ethernet one can have access to any CNC data. I do not know if the statement is true for variables also.
    Not that I am aware of. However I do not have much knowledge with the Ethernet connection and the i-series.

    I was more responding to the idea of writing variables to a program and then sending that program to a PC. I have never come across this capability on any Fanuc control. I am sure there may be a way to access the variables with all the new stuff the i-series has and or some software but to write these to a program???

    I guess this is for the gurus that have more knowledge then me on the newer fancy stuff.

    Stevo

  14. #14
    Join Date
    May 2008
    Posts
    157
    I just found a way of outputting common variable values into a program in the 0i-MD series controller. Although this is not automated process, once can punch the common variable values into a program which goes into whatever memory the I/O channel points to.

  15. #15
    Join Date
    Aug 2009
    Posts
    684
    Hi,

    Can you give us an example of what this file format looks like and what needs to be done to get it into an Excel spreadsheet?

    Cheers,

    DP

  16. #16
    Join Date
    Aug 2009
    Posts
    684
    Thanks for the update yaji63....

    I assume you must have software to convert the outputted values from 64-bit double-precision real number format to a useable decimal? If you know of a method of 64-bit binary conversion that I can follow without my brain rebelling against me I would love to see it.

    I have, however, hit on another way to get the figures out of the control in decimal form. You do need to have manual guide interface with new cycles activated though.

    Let us know if you are interested...

    DP

  17. #17
    Join Date
    Dec 2006
    Posts
    116
    Quote Originally Posted by sinha_nsit View Post
    Do you want to use the value of a common variable inside a program or want to print the values calculated in a program through RS232?
    The first requirement is no big deal. If #500 contains 1.0, G#500 is equivalent to G01, and so on.
    Use DPRINT for the second requirement.
    I know that I am digging this thread up, but i am at a place where I would like the common variable to be printed out from the control.

    Here is what is going on:
    I'm using a probe to do a first article on a part, then having the operator write down the numbers created on our inspection sheets.

    Here is what I want to happen:
    Probe to do first article and error out if part is out of tolerance.(I will write the macros as needed).
    Then the control to print out the dimensions so the operator will attach that information to the inspection sheet.

    So... How can that happen
    WANNA GO FASTER

  18. #18
    Join Date
    May 2008
    Posts
    157
    Quote Originally Posted by metlshpr View Post
    I know that I am digging this thread up, but i am at a place where I would like the common variable to be printed out from the control.

    Here is what is going on:
    I'm using a probe to do a first article on a part, then having the operator write down the numbers created on our inspection sheets.

    Here is what I want to happen:
    Probe to do first article and error out if part is out of tolerance.(I will write the macros as needed).
    Then the control to print out the dimensions so the operator will attach that information to the inspection sheet.

    So... How can that happen
    May be you should open a new thread on this as mine is a pretty old thread and people might not notice it for you to get a reply. But from whatever i know you should be able to print that information out without issues if you use DPRINT and write a piece of macro which prints whatever variable value you want printed.

  19. #19
    Join Date
    Dec 2006
    Posts
    116
    Quote Originally Posted by yaji63 View Post
    May be you should open a new thread on this as mine is a pretty old thread and people might not notice it for you to get a reply. But from whatever i know you should be able to print that information out without issues if you use DPRINT and write a piece of macro which prints whatever variable value you want printed.
    I have started a new thread http://www.cnczone.com/forums/fanuc/..._give_fai.html


    But still haven't gotten any hits. Could you give me an example of the macro you are talking about?
    WANNA GO FASTER

  20. #20
    Quote Originally Posted by yaji63 View Post
    I' am using Fanuc 0i-MD which is supposed to be the latest among the 0i controllers. They claim that it has most features of 18i incorporated into it except for the true multi axis capabilities and some the HPCC options. I was only hoping against hope that i will find an alternative method to DPRINT.
    On my 18i-B rig i have a combined data server and fast ethernet board, along with the standard embedded, i have not seen any problems with FOCAS whilst using a data server.

    Fanuc say that there can only be one connection to the embedded at any one time, again this hasn't ever caused problems.

    FOCAS would get you the data you require. As would DPRNT.
    CNC Data Ltd
    www.cncdata.co.uk

Page 1 of 2 12

Similar Threads

  1. Displaying variable values onscreen?
    By facegarden in forum Haas Mills
    Replies: 29
    Last Post: 04-30-2023, 10:23 AM
  2. Common Variable values output into a program
    By yaji63 in forum G-Code Programing
    Replies: 4
    Last Post: 05-17-2012, 06:17 AM
  3. Replies: 0
    Last Post: 12-27-2010, 09:55 AM
  4. outputting variables to a program
    By bob in windsor in forum Fanuc
    Replies: 4
    Last Post: 03-21-2010, 04:43 PM
  5. EMC bug? axis position values instantly change after end of program
    By davidma in forum LinuxCNC (formerly EMC2)
    Replies: 5
    Last Post: 12-01-2007, 11:11 PM

Posting Permissions

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