Hello Guest it is September 28, 2020, 06:12:37 AM

Author Topic: Computer Halting due to 4 input Turret  (Read 3778 times)

0 Members and 1 Guest are viewing this topic.

Computer Halting due to 4 input Turret
« on: February 22, 2009, 02:24:22 AM »
Hi,

I am facing a strange problem my lathe turret has 10 tool i made a binray 4 bit to select tool when i use only 3 inputs it works fine as soon as i give 4th input to parallel port it halts the system.  I have cheked this on built in parallel port and pci parallel port card it gives same problem. Any sujestion or any one facing same problem.

Regards

Ahmed

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Computer Halting due to 4 input Turret
« Reply #1 on: February 22, 2009, 03:11:51 AM »
What is in your macro?
Hood
Re: Computer Halting due to 4 input Turret
« Reply #2 on: February 22, 2009, 08:52:56 AM »
What is in your macro?
Hood

I modified the 3 input tool changer on forum as under:

Sub Main()

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

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

If NewTool = OldTool Or NewTool = 0 Then
Exit Sub
End If

If OldTool <> NewTool Then
   While Slot <> NewTool
   ActivateSignal(OUTPUT3) 'start rotating forward
      If Not IsActive(INPUT4) And Not IsActive(INPUT3) And Not IsActive(INPUT2) And IsActive (INPUT1) Then
      Slot = 1
      End If
      If Not IsActive(INPUT4) And Not IsActive(INPUT3) And IsActive(INPUT2) And Not IsActive (INPUT1) Then
      Slot = 2
      End If
      If Not IsActive(INPUT4) And Not IsActive(INPUT3) And IsActive(INPUT2) And IsActive (INPUT1) Then
      Slot = 3
      End If
      If Not IsActive(INPUT4) And IsActive(INPUT3) And Not IsActive(INPUT2) And Not IsActive(INPUT1) Then
      Slot = 4
      End If
      If Not IsActive(INPUT4) And IsActive(INPUT3) And Not IsActive(INPUT2) And IsActive(INPUT1) Then
      Slot = 5
      End If
      If Not IsActive(INPUT4) And IsActive(INPUT3) And IsActive(INPUT2) And Not IsActive(INPUT1) Then
      Slot = 6
      End If
      If Not IsActive(INPUT4) And IsActive(INPUT3) And IsActive(INPUT2) And IsActive (INPUT1) Then
      Slot = 7
      End If
      If  IsActive(INPUT4) And Not IsActive(INPUT3) And Not IsActive(INPUT2) And Not IsActive(INPUT1) Then
      Slot = 8
      End If
      If  IsActive(INPUT4) And Not IsActive(INPUT3) And Not IsActive(INPUT2) And IsActive(INPUT1) Then
      Slot = 9
      End If
      If  IsActive(INPUT4) And Not IsActive(INPUT3) And IsActive(INPUT2) And Not IsActive(INPUT1) Then
      Slot = 10
      End If
   Wend
   Sleep(100)
   DeActivateSignal(OUTPUT3) 'stop rotating forward, rotate backward now
End If

SetOEMDRO(824,NewTool)
Code "G4 P2"          'A pause time of 2 seconds to give your reverse turret time to seat
While IsMoving
Wend

End Sub
Main
« Last Edit: February 22, 2009, 08:57:28 AM by ahmedrehan »

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Computer Halting due to 4 input Turret
« Reply #3 on: February 22, 2009, 09:20:51 AM »
Make sure on your diag page that you can see Inputs 1-4 when you trigger them externally.

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: Computer Halting due to 4 input Turret
« Reply #4 on: February 22, 2009, 09:41:13 AM »
Make sure on your diag page that you can see Inputs 1-4 when you trigger them externally.

scott

yes i have checked it is working there all four inputs

Ahmed

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Computer Halting due to 4 input Turret
« Reply #5 on: February 24, 2009, 09:49:38 AM »
hmmm try reducing your Sleep from 100 to 50 and see if it makes a difference.

Also, RECHECK your logic, make sure you inputs 1-4s conditions do indeed match your slots.

Also, I assume you have a input condition code list of each slot, goto your diangnostic page and rotate
your turret to each slot, make sure that the input LEDs that come on do indeed match your Slot that your using.

if all of that is correct, then I have NO clue why it doesnt work, last case would be to take out the Sleep
all together since mabey your missing the "Inposition" signal.

in the latest dev release Brain said he removed the VBs ability to REV up the processor........ so it may be ok to run it
without the sleep if it doesnt work any other way.

scott
« Last Edit: February 24, 2009, 10:00:40 AM by poppabear »
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/