585,758 active members*
4,264 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Read D-parameter in CNC-programme
Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2010
    Posts
    0

    Question Read D-parameter in CNC-programme

    Can someone please advice me how to read PMC-parameter "D-type" in a NC-progamme? It´s for a Fanuc 31i.
    I would like to use this external bit information in a macro, calculating variables.

    Thank you!

  2. #2
    Join Date
    Sep 2010
    Posts
    125
    you can only read data parameters through your ladder programm using special instructions.So only one modification of your ladder programm can help you using window(sub 51 or sub 52 i think)

  3. #3
    Join Date
    Oct 2010
    Posts
    0
    Thank you,
    I have got an answer from another source.
    It turns out to be readable by using "G340 Fn. An. Qn. ;"
    Where:
    "F" specifies numbers of bytes:
    F0.=bit, F1.=1byte, F2.=2bytes, F4.=4bytes
    "A" specifies adress:
    A0.=R, A1=D, A2=C, A3=K, A4=X, A5=Y, A6=F, A7=G
    "Q" specifies adress number
    e.g. G340 F0. A0. Q128.3 ; Reads status of R128 bit 3
    G340 F2. A1. Q80. ; Reads status of D80 (2 bytes)

    The value is written to macro variable #100 which can be used in the NC-programs.

    Hope this will be useful to other programmers as well.

    /Ingmar

  4. #4
    Join Date
    Feb 2006
    Posts
    1792
    Does it apply to 31i only?

  5. #5
    Join Date
    Oct 2010
    Posts
    0
    No.
    I am quite sure it is working in Fanuc 16i/18i/30i as well.

  6. #6
    Join Date
    Aug 2009
    Posts
    684
    How is your program using this data? Just curious...

    DP

  7. #7
    Join Date
    Oct 2010
    Posts
    0
    In this case we thought of using some externaly set D-parameters as a code for calling up different machining programs from a network.
    There is a robot loading the machine with different articles and it can set these parameters externaly. Then we can call the requested program with this code.
    G340 A F Q
    M198 P#100
    M30

    There are naturally a lot of other examples one can think of using different status of parameters, e.g. jump in programs depending on situation.

  8. #8
    Join Date
    Aug 2009
    Posts
    684
    Sounds extremely complicated. I'm already up to 100 variables just to automatically time shifts and cycle processes...on one machine.

    Would it be simpler to program another robot with a large whip attachment to whip the robots in question until they get their act together?

    DP

  9. #9
    Join Date
    Jun 2007
    Posts
    119

    G340

    Where can I find more details about the G340

  10. #10
    Join Date
    Aug 2009
    Posts
    684
    Is there anything similar to WRITE to a D-parameter from within a program?

    DP

Similar Threads

  1. can we read the current status of a parameter
    By sinha_nsit in forum Fanuc
    Replies: 12
    Last Post: 12-07-2009, 01:44 PM
  2. How do I read the value of an F-type parameter into a macro variable?
    By Jan d. in forum Mazak, Mitsubishi, Mazatrol
    Replies: 24
    Last Post: 02-18-2009, 05:47 AM
  3. 3d scanner cad/cam programme
    By paul h in forum Uncategorised CAD Discussion
    Replies: 2
    Last Post: 11-25-2008, 11:23 PM
  4. slotting programme
    By davedoubleu in forum Haas Mills
    Replies: 3
    Last Post: 09-27-2007, 08:42 PM
  5. plc programme
    By mohd khalid in forum PIC Programing / Design
    Replies: 1
    Last Post: 05-07-2007, 09:36 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
  •