Hello Guest it is April 25, 2024, 05:43:41 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Andygraphy

Pages: 1 2 »
1
Also ich habe bei mir an der Emco das System so eingerichtet, dass Mach4 mir eine Warnung ausspuckt, wenn ich die Achsen bestrome und diese nicht referenziert sind. Bei der Warnmeldung kann ich dann direkt die Referenzfahrt starten und er macht beide Achsen inkl WZW. Sodass hier nie was vergessen wird, bzw. vergessen werden kann. Und die Schrittkette mit dem Magnet auslösen usw, ist in der Referenzfahrt ja auch verankert, sodass da kein Schaden passieren kann.

2
du solltest beides voneinander trennen. ich würde das wie folgt machen:

ohne makro:
-> Referenzfahrten:
-X-Achse
-Werkzeugwechsler ->(Magnet an, Schrittmotor drehen lassen bis der Referenzschalter anspricht, schrittmotor aus, magnet aus, Werkzeug auf Nr.1 im System setzen)
-Z-Achse

M6 Makro:
-Werkzeugwechsler ->(Magnet an, Schrittmotor drehen lassen bis das Entsprechende Werkzeug erreicht ist, schrittmotor aus, magnet aus, Werkzeug auf Nr.X im System setzen.

Im M6 Makro spielt dann der Referenzschalter keine Rolle mehr, da dieser nur beim Einschalten der Maschine zu Initialisierung gebraucht wird. Wie ist denn der Wechsler überhaupt aufgebaut? Wie viel Sensorik ist da vorhanden).

3
die Referenzfahrt wird nicht über das M6 Makro gemacht... M6 dient rein zum Werkzeugwechsel, nicht um irgendwas zu referenzieren. Aus welcher Ecke kommst du denn? Hast du dich schon ein wenig mit LUA auseinander gesetzt? Screenload Script und PLC Script in Mach4?

4
Hast du denn soweit schon alles Verkabelt? Sprich, die X und Z Achse an das Pokeys? Kannst du denn via Mach4 schon die X und Z Achse manuell verfahren? Die Referenzfahrt läuft bei mir nicht über ein Makro, sondern übers "System" selbst. Ich kann da später mal reinschauen wie das bei mir aussieht. Du kannst mir vielleicht schon sagen welche Achse welchem Motor Ausgang am Pokeys zugewiesen ist.

gruß
Andy

5
Hallo Ralf,

das ist ja witzig! ich habe rein zufällig auch noch eine Wabeco CC-D100 im Keller stehen (die ich aber gern Verkaufen möchte), allerdings ebenfalls mit der originalen Steuerung!
Den Wechsler kenne ich... Bei meiner Emco ist es so das hier ein DC-Motor verbaut ist der gegen eine Sperrklinke drückt.. bei der Wabeco hast du ja ein Magnet der ein Sicherungsstift löst damit der Wechsler drehen kann. Somit sind die ansteuerungen etwas anders. Eine Referenzfahrt muss der Wechsler ja machen damit er weiß welches Werkzeug gerade in Position ist.

Grüße
Andy

6
Hallo zusammen,

ich bin gerade dabei eine ältere Emco PCTurn 55 auf Mach4 umzubauen. Als Board habe ich ein Pokeys57cnc verwendet. Die Maschine besitzt einen 6-Fach Werkzeugwechsler welchen ich natürlich ebenfalls weiterhin verwenden möchte. Leider kommt hier auch schon das Problem... ich schaffe es nicht alleine ein Makro zum Werkzeugwechsler für die Maschine zu erstellen :( Was bisher allerdings funktioniert ist eine referenzfahrt der Wechsler auf Werkzeug Nr.1. Jetzt fehlt noch der Wechsel an sich selbst inkl. die Offset setzung.
Ist hier jemand in LUA ziemlich fit und könnte mir helfen?
Die Maschine steht in meiner Wohnung sodass ich schnell auch einiges testen könnte!

Zu diesem Thema habe ich auch ein alten Thread gefunden, welcher leider kein Finales Ergebnis zeigt... Auch das Anschreiben beider User hat nix gebracht (keine Antwort): https://www.machsupport.com/forum/index.php?action=post;topic=38376.20;last_msg=260762

viele Grüße
Andy

7
Mach4 General Discussion / Need Help to Create a Lathe Toolchange Macro
« on: February 05, 2020, 12:22:15 PM »
hello everyone,

i have an older Emco PCTurn 55 Lathe with an automatic 6-position toolchanger which is on a retrofit to Mach4 right now. As a controller i use a Pokeys57cnc board. On the way to find a solution how i can use the original toolchanger with mach4, i found this older topic:
 https://www.machsupport.com/forum/index.php?action=post;topic=38376.20;last_msg=260762
sadly the conversation ended up with no final result :/ i tried to ask both users if their can help or have a final solution right now.. but i didn`t get any answers...

i want to make my machine runing... what i solved is the homing of my toolchanger. that works! what i need right now is the toolchange inculde setting the right offset.
is there anyone who can help me to fix my problem?
the machine is in my livingroom...so i can try some changes directly.

best whishes from germany,
Andy

8
VB and the development of wizards / Re: Emco Turn tool changer macro
« on: February 01, 2020, 12:33:30 PM »
Hello everybody...
is here anyone who can help translate this macro into a Mach4 LUA Macro? :( I need that one for my PCTurn 55 Convertion.. I don`t need the point for reference my Toolchanger. That works right know...  :) i only need the point to change the tools and set the right offset.

best regards
Andy

Hi

I eventually got mine to work.

Here is the final version of the macro with comments embedded to show what's going on. You can also get it to write to a logfile to give you some diagnostics if it's not doing what you want.

Hope it helps.

Paul

Code: [Select]
'M6Start.M1s
'Input1 is an optical sensor used to count tool positions
'Input2 is from a microswitch used to determine tool 0 position
'OUTPUT6 drives the tool changer forward, de activating it allows the tool changer to rotate back against the ratchet pawl at low power and is the default
'Un comment the Open statement, various write# statements and the close# function to write a logfile for diagnostic purposes

'Close #1
'Open "M6start_log.txt" For Output As #1 'open a file to write logs to
NewTool = GetSelectedTool()
'NewTool = 2
'Write #1, "NewTool ", NewTool
OldTool = GetCurrentTool()
'Write #1, "OldTool ", OldTool
MaxToolNum = 6 'Max number of tools for the changer
CurrPos = OldTool

While (NewTool > MaxToolNum)
    NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend

    'there is nothing to do so we just exit
If (NewTool = OldTool) And (NewTool > 0) Then
'Write #1, "New tool number is the same as old tool number. Nothing to do "
    Exit Sub
End If

'If OldTool is 0 that means we dont know where the tool changer is currently positioned and need to reference to the microswitch for tool 1 position.
    'need to establish tool 0 position from microswitch
If (OldTool = 0) Then
'Write #1, "Old tool number is zero, looking for reference position"
ActivateSignal(OUTPUT5)' Set toolchanger for full speed move
        'Write #1, "Activated Output 5 to enable toolchanger motor"
        ActivateSignal(OUTPUT6)' rotate tool changer forward
        'Write #1, "Activated Output 6 to set forward direction"
    While Not IsActive(INPUT2)
    Wend
    ' Input 2 must Now be active so the microswitch has been triggered at position 1
    CurrPos = 1
    'Write #1, "Reference position found "
    ' Decide whether to just stop for the normal toolchange process
    If ( CurrPos <> NewTool) Then
     DeActivateSignal(OUTPUT6)
     DeActivateSignal(OUTPUT5)
    Else
    ' Or if we actuallly wanted tool 1 then stop and lock
           DeActivateSignal(OUTPUT5) 'stop rotating forward, rotate backward now
   'Write #1, "DeActivateSignal Output 5 toolchanger reverse "
           SetCurrentTool(NewTool) 'sets up the current tool variable as the start point for a future tool change
           'Write #1, "Setting CurrentTool to NewTool value ", NewTool
           Sleep(2500) 'Allow a time interval for the toolchanger to settle back against the ratchet pawl
           'Write #1, "Waited 2.5 seconds for toolchanger to lock "
           DeActivateSignal(OUTPUT6) 'Disable toolchanger motor
           'Write #1, "DeActivateSignal Output 6 toolchanger stop "
    End If
End If

If (CurrPos <> NewTool) Then 'write the start condition to a variable
If IsActive(INPUT1) Then
PreviousSensorState = "Active"
Else
PreviousSensorState = "Inactive"
End If
'Write #1, "PreviousSensorState =", PreviousSensorState
ActivateSignal(OUTPUT5)' Set toolchanger for full speed move
        'Write #1, "ActivateSignal Output 6 toolchanger go"
        ActivateSignal(OUTPUT6) 'start rotating forward
        'Write #1, "ActivateSignal Output 5 toolchanger forward "
    While CurrPos <>  NewTool
    'Some logic to ensure that we only count on the leading edge of a slot in the toolchanger optical disk
        If IsActive(INPUT1) Then
        SensorState = "Active"
        Else
        SensorState = "Inactive"
        End If
        'Write #1, "SensorState =", SensorState
        If SensorState <> PreviousSensorState Then
        If SensorState = "Inactive" Then
        CurrPos = CurrPos +1
        If CurrPos = 7 Then
        CurrPos = 1
        'Write #1, "CurrPos reached 7, reset to 1 "
        End If
        End If
        'Write #1, "CurrPos =", CurrPos
        PreviousSensorState = SensorState
        End If
        If CurrPos = NewTool Then
              DeActivateSignal(OUTPUT5) 'stop rotating forward, rotate backward now
              'Write #1, "DeActivateSignal Output 5 toolchanger reverse "
              SetCurrentTool(NewTool) 'sets up the current tool variable as the start point for a future tool change
              'Write #1, "Setting CurrentTool to NewTool value ", NewTool
              Sleep(1500) 'Allow a time interval for the toolchanger to settle back against the ratchet pawl
              'Write #1, "Waited 1.5 seconds for toolchanger to lock "
              DeActivateSignal(OUTPUT6) 'Disable toolchanger motor
              'Write #1, "DeActivateSignal Output 6 toolchanger stop "
        End If
        sleep(200) ' just slows the iterations down a bit
        'Write #1, "Waited 0.2 second "
    Wend
    'Write #1, "should be job done "
    'Close #1
End If   

9
Hi Craig,
thanks! :) i will look at it tomorrow. Is it maybe possible to get support from you to create the m6 macro?
this is where i`am right now...

to understand it... i have a 6 position toolchanger which is driven by a 24V dc motor on "output3"only in one direction, the reference will be scanned by a encoder signal on "input0" and the tool positions are scanned too by another encoder light source "input4" ....for the input4 -> on every tool position i get a "1" signal from the encoder.
I need a loop to count the tool positions, because the only way of the Toolnumbers are 1,2,3,4,5,6,1,2,3,4,5,6,1,2....and so on... the only thing that works now, is if i write in my MDI "M06 T0202", the motor starts to move... but it doesn`t count the signals from input 4 and didn`t stop the motor.

Before of all... i made a reference from the tool changer so that it starts from tool number 1 .. that works.


function m6()
   
local inst = mc.mcGetInstance()
local out3= mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT3); 
local outstate = mc.mcSignalGetState(out3);
local signalfait = mc.ISIG_INPUT4
local max = "6"                                               --maximal tools
local selectedTool = mc.mcToolGetSelected(inst) --selected tool
selectedTool = math.tointeger(selectedTool)
local currentTool = mc.mcToolGetCurrent(inst)   -- current tool
currentTool = math.tointeger(currentTool)
local newTool = mc.mcToolGetCurrent(inst)        -- new tool
newTool = math.tointeger(newTool)


   mc.mcCntlSetLastError(inst, " ");                                          --delete error line
   mc.mcCntlGcodeExecuteWait(inst,"G53 G0 x0 \n G53 G0 Z0") -- go to safety position

if (selectedTool == currentTool)then                                                --if selected tool is equal to current tool then
      mc.mcCntlSetLastError(inst, "new tool = old tool, toolchange not possible"); -- Error

   else
   
   if (selectedTool > max) then                                                     --if selected tool is greater than max tools (6)
      
         wx.wxMessageBox("tool number to high!     max tools = "..tostring(max)) -- Error text
         else
         
         mc.mcSignalSetState(out3, true)                               --Output3 - Toolchange Motor o
         
   while (selectedTool ~= currentTool) do                                       --start loop
         
   
   local selectedTool = mc.mcToolGetSelected(inst)
   selectedTool = math.tointeger(selectedTool)
   local currentTool = mc.mcToolGetCurrent(inst)
   currentTool = math.tointeger(currentTool)   
   local newTool = mc.mcToolGetCurrent(inst)
   newTool = math.tointeger(newTool)   

      if (mc.mcSignalGetState(mc.mcSignalGetHandle(inst, mc.ISIG_INPUT4)) == 1)  then --if "1" Signal on Input4 ,then
      newTool = currentTool + 1                                                                                      -- new tool = current tool + 1
      mc.mcToolSetCurrent(inst,newTool)                                                                         -- set current tool display to current tool number
         if (newTool > max) then                                                                                  -- if new tool is greater then max tool,then
         newTool = 1                                                                                                    -- new tool = 1
         
            if (newTool = selectedTool) then                                                              --if new tool is equal to selected tool, then 
            break                                                                                                    --stop the loop
            mc.mcSignalSetState(out3, false)                                                            --Output 3 off - toolchange motor stop
            mc.mcCntlGcodeExecuteWait(inst,"G43 H??")                                            -- set offset display to new tool offset
            mc.mcToolSetCurrent(inst,newTool)                                                        -- set current tool display to current tool number
            end
         end
      end
   end
end   
         
if (mc.mcInEditor() == 1) then
   m6()
end
------------------------------------------------------   

hopefully you can help and understand me
andy from germany

10
Hi Craig,
thanks! :) i will look at it tomorrow. Is it maybe possible to get support from you to create the m6 macro?

andy

Pages: 1 2 »