Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: RooT21 on January 23, 2013, 12:25:23 PM
-
Hello
I need a VBScript which turned off OUTPUT 1 (spindle relay) when activated input 1
I tried two ways but no result:
1.
ActivateSignal(OUTPUT1)
If Not(IsActive(INPUT13)) Then
DeActivateSignal(OUTPUT1)
If (IsActive(INPUT13)) Then
End If
ActivateSignal(OUTPUT1)
If (IsActive(INPUT13)) Then
End If
DeActivateSignal(OUTPUT1)
If Not(IsActive(INPUT13)) Then
End If
End If
2.
DoSpinCW()
Message "Spindle Start Requested"
ActivateSignal(OUTPUT4)
DoSpinStop()
Message "Spindle Stop"
IsActive(INPUT1)
-
IF Isactive(input1) then 'If signal "input1" is active
DeActivateSignal(output1) ' Turn off output1
End If
End
(;-)TP
-
thanks now it works.
I have another question whether it is possible to write a VBScript:
1. When the axis moving the turn off relay (output1)
2. When the axis is not moving the turn on relay (output1)
-
When you say" When the axis moving the turn" do you mean a specific axis such as X or ANY axis in general XYorZ?
(;-) TP
-
Yes I was thinking about A-axis.
My machine uses a 4-axis in the tangential mode.
Is it possible to write a VB script to turn off relay when moving the A-axis, and the relay turns on again when the A-axis is not moving.
I was thinking, for example:
when using OEM DRO 809 (showing velocity) to turn off relay , when not in use OEM DRO 809 the turn on the relay.