Hello Guest it is March 28, 2024, 12:55:31 PM

Author Topic: output pin assignments  (Read 2630 times)

0 Members and 1 Guest are viewing this topic.

output pin assignments
« on: July 25, 2011, 01:58:11 PM »
    I'm setting up my 1st machine & have questions about outputs. I Have 3 SSRs that operate solenoids, I've got the control circuits routed thru pins 1,14, & 16. I want to be able to activate the SSRs with key assignments, preferably F9,F10 & F11 respectively.
    I have set output #1 to port 1 pin 1, output #2 to port 1 pin 14 & output #3 to port 1 pin 16, in the output signals page. How do I make the key assignments?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: output pin assignments
« Reply #1 on: July 25, 2011, 02:31:24 PM »
I think you would have to make up buttons on screen and make them VB buttons, you would then set these buttons to the keystrokes you wish to use. Next you would save the screen, load it from Mach then you would go to operator menu and Edit Button Scripts, they will be flashing, click on the first and the VB editor would open. You would then type something like the following fr OutPut 1

If  GetOemLED(852)Then
DeActivateSignal(OutPut1)
Else
ActivateSignal(Output1)
End If


You would then save and exit the editor and when you pressed the keystroke you had set it should run the VB and either switch on or off output 1.

You would then need to repeat for the other buttons replacing the output numbers and the output LED numbers in the script

There is an easier option if you do not use the spindle, the flood and the mist coolant, you could set these outputs to be for the spindle, flood etc then the only thing you would need to do would be change the hot key assignment in the screen editor of the spindle, flood and mist buttons to the keys you want.

Sounds complicated I know but its just I am not great at explaining things :(

There may be an easier way but cant think of it if there is.
Hood
Re: output pin assignments
« Reply #2 on: July 25, 2011, 03:00:00 PM »
    I don't need spindle, flood or mist, so that option will work for me. So do I set spindle CW to output #1, CCW to output #4, Flood coolant to output #2 & Mist cool to output #3?
   

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: output pin assignments
« Reply #3 on: July 25, 2011, 03:39:50 PM »
As you only need 3 then  set spindle (CW and CCW) to Output 1, Flood to 2 and Mist to 3

Be aware though that if your code has M3, M4, M5,  M7, M8 or M9 in it it will operate the outputs.
Hood