Hello Guest it is September 20, 2021, 06:18:50 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 - TPS

741
General Mach Discussion / Re: REFF ALL HOME script
« on: February 04, 2020, 01:30:10 AM »
can you see the Mxhome LED's Show up on diagnostic page?

742
General Mach Discussion / Re: System wait macro function help
« on: February 03, 2020, 06:05:13 AM »
Sorry my fault.

code corrected:
Code: [Select]
If GetOemLED(821) Then      'Bar end signal
Code "G0 G54 Z110"
ResetOutBit(90,11)  'Collet close reset
SetOutBit(90,9)     'Collet Open
        SetOutBit(90,6)     'Collet Open
        SetUserLed(1001,1)  'Set Collet open LED ON
        While Not(GetInBit(91,1))    'Wait for Start signal from Bar fedder
                Sleep(100)
        Wend       

                Code "G0 G54 Z-35"
                Sleep 1000
                If GetInBit(91,1) = 0 Then     'Wait for Start signal from Bar fedder
                Sleep(100)
                End If       

                ResetOutBit(90,9)   'Reset Collet Open
                ResetOutBit(90,6)   'Reset Collet Open
                SetOutBit(90,11)    'Collet Close
                Sleep 100
                SetUserLed(1001,0)  'Set Collet open LED OFF
                Sleep 2000
       
               
Else
ResetOutBit(90,11)  'Collet close reset
sleep 100
SetOutBit(90,9)     'Collet Open
        SetOutBit(90,6)     'Collet Open
        SetUserLed(1001,1)  'Set Collet open LED ON
        While Not(GetInBit(91,1)) 'Wait for Start signal from Bar fedder
                Sleep(100)
        Wend       
        ResetOutBit(90,9)   'Reset Collet Open
        ResetOutBit(90,6)   'Reset Collet Open
        SetOutBit(90,11)    'Collet Close
        sleep 100
        SetUserLed(1001,0)  'Set Collet open LED OFF
        Sleep 2000

End If 


743
General Mach Discussion / Re: System wait macro function help
« on: February 01, 2020, 02:46:41 AM »
can you please post the actual macro you are testing with?
and witch Input led is coming on at the Controller?
if you look on CSMIO webside for macro examples they are using also the GetInBit like me on all my three machines.
so the Problem must be somewhere else.

BTW, if you copy and paste your code into Operator -> VB Script Editor Window and use the >|| button you can step through your
code and see where it goes.

744
General Mach Discussion / Re: System wait macro function help
« on: January 31, 2020, 01:45:59 PM »
... But the problem is that, when it comes to If GetInBit(90,17) = False Then,   it does not wait here ...         

that is the Problem i tryed to explain ....GetInBit(90,17) will not work it has to be GetInBit(91,1)

745
General Mach Discussion / Re: System wait macro function help
« on: January 31, 2020, 08:17:10 AM »
btw i see you are using a csmio/a

there is no Input 90,16 if you are using Input16 it will be 91,0

746
General Mach Discussion / Re: System wait macro function help
« on: January 31, 2020, 08:05:36 AM »
it is GetInBit(x,y) for sure, i have used this in my own macros.

can you see the Input Led on the fron of the Controller comming on?

747
General Mach Discussion / Re: System wait macro function help
« on: January 31, 2020, 06:38:13 AM »
Code: [Select]

If GetInBit(90,16) Then                 'Bar end signal
Code "G0 G54 Z110"              'Clear to make space for Bar fedder to push remnant out
ResetOutBit(90,11)              'Collet close reset
SetOutBit(90,9)                 'Collet Open
        SetOutBit(90,6)                 'Collet Open
        SetUserLed(1001,1)              'Set Collet open LED ON
        If GetInBit(90,17) = False Then 'Wait for Start signal from Bar fedder                   
                Sleep(50)
        End If
        Code "G0 G54 Z-35"              'Position stopper at top cut position
                Sleep(1000)
        If GetInBit(90,17) = False Then 'Wait for Start signal from Bar fedder                   
                Sleep(50)
        End If
        ResetOutBit(90,9)               'Reset Collet Open
        ResetOutBit(90,6)               'Reset Collet Open
        SetOutBit(90,11)                'Collet Close
        Sleep(100)
        SetUserLed(1001,0)              'Set Collet open LED OFF
        Sleep(2000)
Else
ResetOutBit(90,11)              'Collet close reset
Sleep(100)
SetOutBit(90,9)                 'Collet Open
        SetOutBit(90,6)                 'Collet Open
        SetUserLed(1001,1)              'Set Collet open LED ON
        If GetInBit(90,17) = False Then 'Wait for Start signal from Bar fedder
                Sleep(50)
        End If       
        ResetOutBit(90,9)               'Reset Collet Open
        ResetOutBit(90,6)               'Reset Collet Open
        SetOutBit(90,11)                'Collet Close
        Sleep(100)
        SetUserLed(1001,0)              'Set Collet open LED OFF
        Sleep(2000)
End If 





748
General Mach Discussion / Re: System wait macro function help
« on: January 31, 2020, 05:53:21 AM »
it will continue program if Input is true

Code: [Select]
If GetOemLED(821) Then
   Code "G0 G54 Z110"
   ResetOutBit(90,11)
   SetOutBit(90,9)
        SetOutBit(90,6)
        SetUserLed(1001,1

Else
   ResetOutBit(90,11)
   SetOutBit(90,9)
        SetOutBit(90,6)
        SetUserLed(1001,1)
        If GetInBit(adr, bit) = False Then
Sleep(50)
End If
        ResetOutBit(90,9)
        ResetOutBit(90,6)
        Sleep 100
        SetOutBit(90,11)
        SetUserLed(1001,0)
   


End If
you Need to replace "adr" and "bit" by your real values.

749
General Mach Discussion / Re: System wait macro function help
« on: January 30, 2020, 11:02:11 AM »
Looks like you are using a CSMIO

you can use GetInBit

Code: [Select]


If GetInBit(adr, bit) = False Then
Sleep(50)
End If