Hello Guest it is April 25, 2024, 01:06:52 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 - boydage

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »
11
Ok so I took a look at think this opto board will work. I will also consider some more safety interlocks.

Interesting, and to be expected, I used a schneider contactor yesterday that come off Aliexpress. This is a 3p contactor to power the vfd I am using for my lathe motor. I did check to see if lots of people had purchased them off this seller. And another self smack on the head when I measured 50v between two of the phases (415v in NZ). The almost complete loss of a phase through that contactor, made my VFD error and shut down. Ive normally purchased genuine parts for line voltage work. This was an exception, and a lesson. Chinese copies are definately at your own risk.

Oh, and here I am purchasing a $5 opto board......

https://www.aliexpress.com/item/33017803867.html?spm=a2g0o.productlist.main.3.5d21584f54hRV8&algo_pvid=4aec9757-9819-4cd9-a94e-6967797c330c&algo_exp_id=4aec9757-9819-4cd9-a94e-6967797c330c-1&pdp_npi=3%40dis%21NZD%216.28%215.72%21%21%213.83%21%21%40210218bf16900666621192466d077b%2167157033790%21sea%21NZ%212099605941&curPageLogUid=JjJXcSfo8BKN


12
Oh your so right! Thats a big DERRR on me ha.

Hmmm. I am using low voltage SSRs so the BOB can operate them. I wonder if there is any leakage through a diode, or infact if one fails it would be a good size crash possibly on wrong tool selection. I might look for an opto coupler 4-5 way board to properly isolate those common inputs.

Ummm - thanks for the headsup you just saved me a bit of time when it got powered.

13
I really appreciate that. I am using relay logic for tool selection as I only have 5 inputs total into my BOB but have lots of outputs which will go directly to a set of DIN SSRs. I will do that, wire it up, test like you say and report back also after my homing limit switches are wired too. Infact the machine will be complete. I am reasonably confident the wiring design is sound, I am just not positive on the interface with the turret that is not here yet whether its PNP or NPN and how it will connect.

Wiring diagram on my initial plan attached for info.

Please standby for about 4-5 weeks lol

14
With zero ideas of where to go I tried asking ChatGPT and this is the code it responded with after a few attempts. The syntax error has gone, I am just not sure it will work?

Curious indeed.

'Tool change macro for 4 tool turret
Sub Main()
   'Sets variable OldTool to what is currently loaded
   OldTool = GetCurrentTool()
   
   'Sets Variable MaxToolNum to the max number of tools possible
   MaxToolNum = 4
   
   'Sets variable Newtool to the one being selected with M6 T#
   tool = GetSelectedTool()
   NewTool = tool   
   
   'Get positions before moving to do tool change
   x = GetToolChangeStart(0)
 
   
   'If the current tool loaded is 0 or greater than 4 then the tool has been lost
   'so need to ask what tool is currently loaded
   While OldTool = 0 Or OldTool > MaxToolNum
      OldTool = Question("Current tool unknown, enter tool in spindle 1 to " & MaxToolNum)
   Wend
   
   'Sets CurrentTool to Oldtool in case it was lost and entered above
   SetCurrentTool(OldTool)

   'When the tool asked for is invalid, this makes you select a valid tool
   While NewTool > MaxToolNum Or NewTool < 1
      NewTool = Question("Invalid tool chosen, enter tool number 1 to " & MaxToolNum)
   Wend
   
   'If the tool asked for is the same one that is already loaded, then exit the macro
   If NewTool = OldTool Then
      Message "Tool already loaded or tool not specified with T# (ex:M6 T4)"
      Exit Sub
   End If

   'Turn off soft limits if they are on
   If GetOEMLED(23) Then
      DoOEMButton(119)
   End If

   'Moves X axis to tool change position
   ' Assuming the following line is the correct way to specify the position:
   ' Code "G53 X0 Y0"
   Code "G53 X0 Y0"
   While IsMoving()
   Wend

   ' Perform the tool change actions based on the selected tool number
   If NewTool = 1 Then
      ActivateSignal(OUTPUT4) 'Begin rotating turret'
      While Not IsActive(INPUT1) 'Turret has not yet rotated until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT4) 'Stop turret from spinning
      Sleep(1000)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      While Not IsActive(INPUT2) 'Tool locked signal is not active
      Wend
      DeactivateSignal(OUTPUT8)
   
   ElseIf NewTool = 2 Then
      ActivateSignal(OUTPUT5) 'Begin rotating turret'
      While Not IsActive(INPUT1) 'Turret has not yet rotated until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT5) 'Stop turret from spinning
      Sleep(1000)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      While Not IsActive(INPUT2) 'Tool locked signal is not active
      Wend
      DeactivateSignal(OUTPUT8)
   
   ElseIf NewTool = 3 Then
      ActivateSignal(OUTPUT6) 'Begin rotating turret'
      While Not IsActive(INPUT1) 'Turret has not yet rotated until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT6) 'Stop turret from spinning
      Sleep(1000)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      While Not IsActive(INPUT2) 'Tool locked signal is not active
      Wend
      DeactivateSignal(OUTPUT8)
   
   ElseIf NewTool = 4 Then
      ActivateSignal(OUTPUT7) 'Begin rotating turret'
      While Not IsActive(INPUT1) 'Turret has not yet rotated until the selected tool is in position'
      Wend
      DeactivateSignal(OUTPUT7) 'Stop turret from spinning
      Sleep(1000)
      ActivateSignal(OUTPUT8) 'Reverse Turret
      While Not IsActive(INPUT2) 'Tool locked signal is not active
      Wend
      DeactivateSignal(OUTPUT8)
   
   Else
      ' Handle any other tool number that might be unexpected
      ' ...
   End If

   ' Set the current tool to the new selected tool
   SetCurrentTool(NewTool)
End Sub


15
Novice coder. Lots of time using machines. I thought I would be able to write a specific piece of code for a 4 turret lathe toolchanger made from other samples I have found online. So many different ways to do it. But no easy path to learn from scratch. I plan to do it with a three phase reverse relay, spin the turret until the selected tool shows an input, reverse the turret to lock it. Toolchange done.

My problem is the Mach 3 VB editor only shows a "syntax error" every time but wont highlight or show where the problem is. Quite similar to troubleshooting an elec system with no meter - all it does is frustrate me.

I need some help please either in what I am doing wrong with the editor so its more useful, or, well thats it in a nutshell - what am I doing wrong? I thought the editor was supposed to jump through each line and highlight the piece of code that wont work. Hey if there is a more suitable editor would I be inclined to use that?

I dont even know the basic laws I am supposed to follow. This is the code I am trying to understand and get to work so I can at least test it on my machine.

'Tool change macro for 4 tool turret
Sub Main()
   'Sets variable OldTool to what is currently loaded
   OldTool=GetCurrentTool()
   
   'Sets Variable MaxToolNum to the max number of tools possible
   MaxToolNum=4
   
   'Sets variable Newtool to the one being selected with M6 T#
   tool = GetSelectedTool()
        NewTool = tool   
   
   'Get positions before moving to do tool change
   x = GetToolChangeStart( 0 )
 
   
   'If the current tool loaded is 0 or greater than 4 then tool has been lost
   'so need to ask what tool is currently loaded
   While OldTool=0 Or OldTool>4
   OldTool=Question ("Current tool unknown, enter tool in spindle 1 to " & MaxToolNum)
   Wend
   
   'Sets CurrentTool to Oldtool in case it was lost and entered above
   SetCurrentTool(OldTool)

   'When the tool asked for is invalid then this makes you select a valid tool
   While NewTool > MaxToolNum Or NewTool <1
   NewTool = Question ("Invalid tool chosen, enter tool number 1 to " & MaxToolNum)
   Wend
   
        'If the tool asked for is the same one that is already loaded then exit macro
   If NewTool=OldTool Then
   Message "Tool already loaded or tool not specified with T# (ex:M6 T4)"
      Exit Sub
   End If

'Turn off soft limits if they are on
If GetOEMLED(23) Then
DoOEMButton(119)
End If

   'Moves X axis to toolchange position
   

   
End If
   
Code"G53 X0 0"                              'Move to tool change location
While Ismoving()
Wend         




If NewTool= 1 Then
              ActivateSignal(OUTPUT4) 'Begin rotating turret'
              If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
              DeActivateSignal(OUTPUT4) 'Stop turret from spinning"
              Sleep(1000)
              ActivateSignal (OUTPUT8) 'Reverse Turret"
              If IsActive(INPUT2) Then 'Tool locked signal'
              DeactivateSignal(OUTPUT8)
             
              Exit Sub
             
If NewTool= 2 Then
              ActivateSignal(OUTPUT5) 'Begin rotating turret'
              If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
              DeActivateSignal(OUTPUT5) 'Stop turret from spinning"
              Sleep(1000)
              ActivateSignal (OUTPUT8) 'Reverse Turret"
              If IsActive(INPUT2) Then 'Tool locked signal'
              DeactivateSignal(OUTPUT8)
             
              Exit Sub
             
If NewTool= 3 Then
              ActivateSignal(OUTPUT6) 'Begin rotating turret'
              If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
              DeActivateSignal(OUTPUT6) 'Stop turret from spinning"
              Sleep(1000)
              ActivateSignal (OUTPUT8) 'Reverse Turret"
              If IsActive(INPUT2) Then 'Tool locked signal'
              DeactivateSignal(OUTPUT8)
             
              Exit Sub               

                                       
If NewTool= 4 Then
              ActivateSignal(OUTPUT7) 'Begin rotating turret'
              If IsActive(INPUT1) Then 'Turret has rotated until selected tool is in position'
              DeActivateSignal(OUTPUT7) 'Stop turret from spinning"
              Sleep(1000)
              ActivateSignal (OUTPUT8) 'Reverse Turret"
              If IsActive(INPUT2) Then 'Tool locked signal'
              DeactivateSignal(OUTPUT8)
             
              Exit Sub               
                           
               
               
               
SetCurrentTool(NewTool)

End



                         

16
Mach4 General Discussion / Re: Two issues I need help with. Please.
« on: May 04, 2023, 03:01:22 AM »
Thanks. That would be good. I have started to think that perhaps it is an electric connectivity thing, but then I cant fault it in the ways we would check. Its one where I keep going around in circles. Like I mentioned, it worked, once and once only. Then it didnt.

I cant even find the script for the probing screen.

17
Mach4 General Discussion / Re: Two issues I need help with. Please.
« on: May 03, 2023, 10:19:15 PM »
I dont think the ESS setting box is the problem but if it is I would like to know.

The problem is, my probe(s), all of them light up the blue LEDs on the GUI. The touch module works fine. The probes all show up on diagnostics as operating fine.

The Mach 4 Probing Screen. Does not see my probe or any of the 3 inputs I have.

18
Mach4 General Discussion / Re: Two issues I need help with. Please.
« on: May 03, 2023, 08:13:51 PM »
Thankyou. That point was only a note, its not the cause of my problem. I was hoping for some good robust advice on my connectivity issues whether be software or not.

19
Mach4 General Discussion / Re: Two issues I need help with. Please.
« on: May 03, 2023, 01:40:09 AM »
Update and more confusing. All my probe inputs show up on the main GUI blue lights. If I open the Probing screen, initially nothing worked. Then, without any changes, my number 1 probe managed to activate the indicator LED but for all inputs G31, G31.1, G31.2 and so on. No other inputs recognized contrary to the main GUI.

Now, it wont again at all. Its not physical its software and I dont know what to do when it works once but not twice. Please help.

20
Mach4 General Discussion / Two issues I need help with. Please.
« on: May 03, 2023, 12:43:14 AM »
These may be old and I am digging up the same problems. I cant seen to find answers though. Mach 4. ESS. Upgraded CNC Router. Slightly above average technician slightly below average user. Very basic programming knowledge. Have been using the machine to manufacture parts. Mostly working well.

Probing. I hate it and my probe has been destroyed by several non commanded actions - the worst one was trying to use the Fusion 360 routine with Mach 3 - it just smashed my probe straight into a vice at high speed before I could react. The Mach 4 Touch module Z and corner operation only works with the "Probing failure disables Mach 4" unchecked. If its checked the probing operation stops during repositioning move. I dont know what to do with this? It works with the box unchecked. I just dont know how accurate the touch option is, it only touches once instead of backing off and touching a second time.

Probing Mach 4. If I try to use the other Mach 4 Probing program it fails immediately. I have setup several probing inputs on different pins with a tool setter, probe and additional probe. These all correlate to the blue lights on the interface, G31, G31.1, etc. My main probe being G31 the correct blue light comes on with activation as do the others. But, the Mach 4 probing routine says the incorrect probe has been activated and it errors out contrary to its indication. Stumped how to fix this. To explain further, the Mach Touch operation works, the Mach Probe operation says the wrong probe is activated even though the Touch module and GUI seems correct.

Soft Limits. If I toggle the soft limits it reverses my jogging direction - gee - no idea whats going on there. Machine is in a homed condition.

Zero idea what to do. Tell me I have to learn LUA would be undesirable I just want to use my machine but if there are no options I guess it is what it is. It would be nice though to be able to use the script an expert has written instead. Thanks in advance. Apologies for the old ground. Almost there.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »