Hello Guest it is March 29, 2024, 05:14:47 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 - drumsticksplinter

Pages: « 1 2
11
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 07:32:46 AM »
Hmm, That is strange...

If I edit the M6Start file to be just: SetCurrentTool(6) for example and type M6 into the MDI and enter, nothing happens... this should just make tool number 6, right?

@Graham Waterworth, Thanks I had considered moving over to mach4 eventually, but at the time I started the retrofit a fee years ago, CsLabs who make my controller hadn't got a stable plugin for mach4, I'm not sure if this is still the case now?


12
VB and the development of wizards / Re: Turn tool turret macro
« on: April 21, 2020, 06:14:16 AM »
Hi,

Thanks, yes the macro does this within the DoToolChange() subroutine, but it does not update the Tool No DRO for some reason...



13
VB and the development of wizards / Turn tool turret macro
« on: April 21, 2020, 05:32:54 AM »
Hello,

I'm working on a tool changer turret for a lathe, but I'm having an issue I can't seem to overcome.

I have PLC controlling all of the logic behind the tool changer and this works absolutely perfectly! I am using a brain to send the value from CurrentTool through modbus. This works if I manually put a value in the Tool No DRO. However, If I run my macro, the Tool No DRO does not change and the PLC does not get the new tool number.

I input in the MDI: M6 T0101 for example

Am I missing something obvious here please?

Thanks,

M6 Start macro:

Code: [Select]
'-----------------------------------------------------------------------
'CYCLONE - Auto tool changer (8 pos turret type)
'V1.0
'-----------------------------------------------------------------------

'-----------------------------------------------------------------------
'CONFIG
'-----------------------------------------------------------------------


Tool = GetSelectedTool()
OldTool = GetCurrentTool()
NewTool = Tool
MaxToolNum = 8 'Max number of tools for the changer

'-----------------------------------------------------------------------
'MACRO START
'-----------------------------------------------------------------------
IsActive(INPUT1)
DeActivateSignal(OUTPUT6) 'Make sure signal to PLC is negative
'code"G91 G28 Z0" 'set incremental, return home via X first
'While IsMoving()
'Wend

While NewTool > MaxToolNum 'Dont allow tool number greater 8
Message("MAX TOOL NUMBER = 8")
Wend

While NewTool < 0 'Dont allow tool number less than 1
Message("INVALID TOOL NUMBER")
Wend

If NewTool = OldTool Then
Call ToolComplete
Else
If IsActive(INPUT1) Then 'ok signal from PLC
Call DoToolChange
Else
Message("TURRET NOT READY!")
End If
End If
End

'----------------------------------------------------------------------
'TOOL CHANGE
'----------------------------------------------------------------------

Sub DoToolChange()

SetCurrentTool(NewTool) 'Update the tool DRO
Call ActivateSignal(OUTPUT6) 'Set tool change allowed signal to PLC
SetTimer(1)
t = GetTimer(1)
sleep 10

If Not IsActive(INPUT1) Then  'If input goes low, turret is moving

While Not IsActive(INPUT1) 'While the turret is moving, count down

If IsActive(INPUT1) Then 'If input goes high again, tool has cycled
Call ToolComplete
Else
If t > 4000 Then
Call ToolFailed
End If
End If

sleep 10
Wend

End If


End Sub
     
 

'----------------------------------------------------------------------
'TOOL COMPLETE
'----------------------------------------------------------------------

Sub ToolComplete()
DeActivateSignal(OUTPUT6)
End Sub


'----------------------------------------------------------------------
'TOOL FAILED
'----------------------------------------------------------------------

Sub ToolFailed()
f = 1
DeActivateSignal(OUTPUT6)
While f = 1
Message("TURRET TIMEOUT")
Wend

End Sub               

14
Brains Development / Re: Modbus Click PLC Brain
« on: December 08, 2017, 07:46:43 PM »
Well, I've been on this all evening and tried everything I could think of to get it working... When I was closing down my browser tabs about to call it a night I noticed something in another post  ::) In the Modbus Config, I had cfg#0 as in input holding, when I'm actually wanting to write to a holding register, making it an output holding.... duh! Tried it and it works  ;D

15
Brains Development / Modbus Click PLC Brain
« on: December 08, 2017, 07:08:09 PM »
Hi Guys,

I'm working on a machine where I have a turret tool changer controlled by a Click PLC. The PLC works fine and I can connect to it via the modbus settings (test modbus) to read and write to and from the holding registers, which all checks out ok. I want to use a simple brain that writes the new tool number into my PLC's holding register via modbus.

I've tried putting together a brain that passes the current tool DRO value through modbus to my PLC, but I can't seem to get it to do anything... The values change to that of the current tool, but it doesn't get written in to the register. I have tried all possible settings in the brain terminator but nothing works. I know modbus is working, because I can read and write to the registers in the test modbus page. I've even thought about handling this in the macro with some VB script, but I can't find anything about writing to registers via Modbus, there is info on reading from them though strangely...

Thanks!




16
CS-Lab / CSMIO/IP-A Mach4 lathe retrofit
« on: May 04, 2016, 04:46:05 PM »
Hi guys,

I'm doing a retrofit of a small lathe using the csmio/ip-a module, plus the enc & mpg modules once they arrive. I've just got a few queries regarding the functionality of the mach4 plugin cslabs have provided. I've tried setting up my spindle today, but can't seem to get any analog voltage. I reverted back to mach3 briefly and can get the spindle running easily. The setup is slightly different in mach4 and I'm not familiar with it yet. I just wondered if anyone has already got a machine running on the same setup? I've read that threading and rigid tapping aren't supported so far and will be coming in a later upgrade, any ideas when these updates are likely to be?

Thanks.

17
Mach4 General Discussion / MPG Functions?
« on: January 02, 2015, 03:24:01 PM »
Hi Guys,

I'm just wondering about the MPG function in Mach4 Hobby Demo. I'm just playing around in the simulation mode at the moment, hoping to get my pokeys working with the Beta plugin but no luck so far. I'm still trying to get used to the new layout and can't find any mention of an MPG, I'm also having issues with keyboard jogging, can't seem to get the button to turn to 'on'? Any Ideas?

Thanks,

18
Mach4 General Discussion / Re: Keyboard Plugin
« on: January 02, 2015, 03:13:30 PM »
I also have some confusion about the keyboard jogging button, I can't seem to get it to do anything. I'm just trying out mach4 in Simulation mode atm. Any pointers on this 1 please?

Thanks

19
Hi Guys,

Just caught in on this discussion. I think i must be really stupid because i cant seem to get my m6 start to work. I have written/modified a script for m6, which works perfectly in the script editor, i change the tool number hit debug and my auto toolchanger will locate the tool. When i try with the script editor closed nothing will happen, The command M6 T4 for example pulls up an error handling section of my program when it doesn't with the script editor open?? What is the normal procedure to select a tool in mach3 turn manual mode?

Many Thanks,

Adam

20
General Mach Discussion / Turn A Axis problem Auto Toolchanger
« on: March 12, 2010, 09:25:45 AM »
Hi all!

I'm quite new to all this so I'm sorry if my question is really obvious...

I have a small lathe similar to an Emco compact 5 and I'm using a compact 5 auto toolchanger to be driven from the A axis.
My problem is that my A axis in mach3 turn is playing up. At first i was using X-Z and Y just to test the movement of the toolchanger, which was fine.
I have now come to set up my axis properly using A as a rotary axis and my motors don't like it at all. I get a high screeching noise from any motor i use from the A axis.
I have tried changing the port and pin settings, but it seems to be a problem with the actual A axis in mach3 itself? Maybe i have to change some settings somewhere?

I have modified the emco toolchanger by mounting a stepper motor and slotted disk with opto sensor for tool location feedback.

If anyone has any ideas where i might be going wrong i would really appreciate the help.
I will try and add some pics soon, as my lathe is nearly finished and lookin good  :)

Thanks,

Adam

Pages: « 1 2