Mach3 User DRO: How to create and access DRO from inside macro?

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ส.ค. 2020
  • We can use DRO to save value when Mach3 exits.
    -How to create a new DRO
    -How to access it from inside macro
    Here is the full code of example marco (please see also • Mach3 macro: How to cr... ):
    'Assume that cutter position is at XYZ(0,0,25)
    'Probe position is at XY(100, 20)
    'Move cutter to probe position
    'Code "G0 X100 Y20" 'We will replace this line
    'using mach3 predefined AskTestQuestion() to receive data from
    'user when macro is running
    'Probe_X = AskTextQuestion("Enter Probe position X: ")
    'Probe_Y = AskTextQuestion("Enter Probe position Y: ")
    Probe_X = GetUserDRO(1500) '1500 is just OEM code I assign for X coordinate of Probe. You can change it.
    Probe_Y = GetUserDRO(1501)
    answer = MachMsg("Press enter to move to Probe position: X=" & Probe_X & "Y=" & Probe_Y, "M779: User enter data", 0)
    Code "G0 X"& Probe_X &" Y" & Probe_Y
    'We need to enter these lines
    While IsMoving() 'ensure previous command is completed
    Wend
    answer = MachMsg("Press enter to continue", "M779: User enter data", 0)
    While IsMoving() 'ensure previous command is completed
    Wend
    'G31 fast moving
    Code "G31 Z-10 F200"
    While IsMoving()
    Wend
    answer = MachMsg("End of G31 fast moving", "M779 Auto Tool Zero", 0)
    'G31 slow moving
    z = GetOEMDRO(802) 'get current Z coordinate value
    Code "G0 Z" &(z+1) 'move back 1mm
    Code "G31 Z-10 F25"
    While IsMoving()
    Wend
    answer = MachMsg("End of G31 slow moving", "M779 Auto Tool Zero", 0)
    'Set zero
    SetOEMDRO(802, 0) '802 hold Z coordinate value
    'End

ความคิดเห็น • 7

  • @brocksterification
    @brocksterification 2 ปีที่แล้ว

    Thank you. Very helpful video!! 👍

  • @tantumDicoQuodCogito
    @tantumDicoQuodCogito 3 ปีที่แล้ว

    Good explained

  • @talgtalga3767
    @talgtalga3767 3 ปีที่แล้ว

    hi boss any video simple easy understand about center and edge find in mach 3 with easy way?? nobrequired special tools..

  • @cncschrauber
    @cncschrauber 3 ปีที่แล้ว

    was ist das für ein screen editor ?? kannst du mir den link schicken ?

    • @alpha-go9226
      @alpha-go9226  3 ปีที่แล้ว

      You may try this link: www.machsupport.com/downloads-updates/screensets/
      The download is just under Screen Designers portion.

  • @kncongnghe6205
    @kncongnghe6205 2 ปีที่แล้ว

    Anh làm 1 bài tiếng việt đi anh