Hello Guest it is January 17, 2022, 10:39:13 PM

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 - tantan

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »
101
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: May 02, 2008, 09:19:52 AM »
Hi ron,

I am doing quite well with my ATC for my emcoturn120 but i hope you can spend a little more time for me. my code is actually working completely as a button script. When I copy the code into the M6start macro, and I type T2 or another T6 request in the MDI the macrocode is executed but…..

If I type T6 in the MDI line, I would like to change to the sixed tool. How can I pick up the wanted toolnumber in my m6start code. As soon as I type T6 and the M6start.m1s is executed the “newtool=getselectedtool()” is forced to zero.

i did a little test with the next instruction in the M6start macro;

MsgBox ("newtool = " &GetSelectedTool())

if i type T3 in the MDI line, the m6start runs automatically but the selected tool is resetted to zero.

(i reinstalled mach3 and did no configuration changes; so it is a fresh an clean installation).

i hope you can help me again, i think i am almost there

Thanks for your reply.

antoine

102
hi,

that realy looks good. i hope you can help me with one of my questions; see first post in "VB and development of wizards"

thanks

antoine

103
VB and the development of wizards / m6start.m1s starting with zero
« on: April 30, 2008, 11:06:21 AM »
Hi,

I am doing quite well with my ATC for my emcoturn120. actually the code is working completely as a button script. When I copy the code into the M6start macro, and I type T2 or another T6 request in the MDI the macrocode is executed but…..

If I type T6 in the MDI line, I would like to change to the sixed tool. How kan I pick up the wanted toolnumber in my m6start code. As soon as I type T6 and the M6start.m1s is executed the “newtool=getselectedtool()” is forced to zero.

Thanks for your reply.

antoine

104
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: April 28, 2008, 01:03:03 PM »
hi ron

I AM SORRY, i found the problem. let me explain to you what i did.
i began thinking why the outputs of the second port could be disabled almost immediately after is enabled them. i early day i have been programming PLC's. when that happend in PLC's most of the time i had used the specific register twice. this was exactly what happend i my system. a few months ago a have made some test programs in brains. i used the output 5 and 6 and these programs where still enabled in brains control. i disabled the specific brain and everything works fine now.

i hope it did not keep you awake....

thanks Antoine

105
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: April 28, 2008, 12:26:07 PM »
hi ron,

you are right. your test program works fine. the problem is in my hardware. u use 2 parallelports; one (LPT1)on the motherboard of the computer and one extra PCI port. the outputs connected to the first port (lpt1) work exactly as they should. but if i use the same program to control the outputs on the second port they just pulse. if i write a VBscript with one line: activatesignal(output6), output6 is high for just a 0.1 second or so.

i don't understand the difference between the two ports?

thanks antoine

106
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: April 27, 2008, 12:15:57 PM »
hi,

thank you for your reply. I cannot get the code statement working. i open a vb window, type just the commands:

ActivateSignal(Output5) 
Code "G4 P2"

then i compile and run the program. the program ignores the code statement!
another strange thing is that my outputs 1 2 3 and 4 on my first i/o card can be switched on by the statement ActivateSignal(...). the output 5 and 6 just pulse with the same statement. does that has something to do with hardware or has mach trouble with outputs 5 and 6.

thanks
antoine

107
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: April 25, 2008, 02:28:10 AM »
i am sorry but i do not understand fully what you mean with your latest reply (probably because i am dutch).

what i understand is that i should delete the While IsMoving() function. but can i use the G4 command to delay the activation or deactivation of outputs or is the G4 function not the right one to use for my case?

if i cannot use the G4 command to delay the activation or deactivation of output what function should i use. or do i have to solve this in by hardware?

thanks

antoine
the netherlands

108
VB and the development of wizards / Re: code "G04 P2.0" problem
« on: April 24, 2008, 02:36:31 PM »
thank you for your reply,

what i want with the "G4 p2.0" is that the output 5 stay high for 2 second and then it has to be deactivated. is that possible with the G4 code the way i used it in mach 3 (lathe)?


109
VB and the development of wizards / code "G04 P2.0" problem
« on: April 24, 2008, 12:36:25 PM »
hi again,

i have the next macro which runs perfect except for the [ code "G04 P2.0" ] part. i am sure the subroutine is executed but the output is not latched for 2 seconds. i hope someone can help me because it is an essential part of my machine. (i run mach3 2.63 version on windows xp).

'SetUserDRO(1200,GetSelectedTool())
'OldTool = GetOEMDRO (1200)
wantedtool = GetOEMDRO (1200) 'GetSelectedTool()
MaxToolNum = 8      'Max number of tools for the changer

If newtool = wantedtool Then
Message ("Selected Tool already loaded")
Exit Sub
End If

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

While wantedtool <> newtool

Call actualtool
Call rotateCW
     
Wend 

Call stop_and_lock_turret



'//// Subroutines /////////

Sub actualtool

   If isActive(Input1) And isactive(Input2) And isactive(Input3) And Not isactive(Input4) Then
      NewTool = 1
      End If
   If isActive(Input1) And isactive(Input2) And Not isactive(Input3) And Not isactive(Input4) Then
      NewTool = 2
      End If
   If isActive(Input1) And isactive(Input2) And Not isactive(Input3) And isactive(Input4) Then
      NewTool = 3
      End If
   If isActive(Input1) And Not isactive(Input2) And Not isactive(Input3) And isactive(Input4) Then
      NewTool = 4
      End If
   If isActive(Input1) And Not isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 5
      End If
   If Not isActive(Input1) And Not isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 6
      End If
   If Not isActive(Input1) And isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 7
      End If
   If not isActive(Input1) And isactive(Input2) And isactive(Input3) And not isactive(Input4) Then
      NewTool = 8
      End If
     
      setcurrenttool(newtool)
     
End Sub


Sub rotateCW
   ActivateSignal(Output6)
      While IsMoving()
      Wend
     
End Sub

Sub stop_and_lock_turret

   DeActivateSignal(Output6)
      While IsMoving()
      Wend
   ActivateSignal(Output5) 
      Code "G4 P2"    'Wait for the tool to rotate onto ratchet stop
      While IsMoving()
      Wend
   DeActivateSignal(Output5)
      While IsMoving()
      Wend
     
End Sub   
   

thanks

antoine
the netherlands

110
VB and the development of wizards / Re: some VB questions
« on: April 20, 2008, 01:28:25 PM »
thank you,

just what i needed. i  :)

antoine

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