How to Program Outputs and Add Start and Stop Scripts.

ppersaud

ppersaud
Hi,

I have a solid-state switch (SSS) that I have connected to my CNC's spindle. When I send a high voltage signal (+5VDC) to the SSS, it turns the spindle on. I would like to have a Start-Script that does an Auto Tool Zero and then turns on my spindle before running the actual job. Additionally, I would like to have a Stop-Script that turns the spindle off and moves it to its parked position. Specific questions I have:

  • How do I map a change in an input to a desired output (TTL or Relay)? For example I have a Normal-Low Signal on Input-1 and when it goes high, I want to have TTL Output-3 go from low to high and Relay Output-1 to open to ground.
  • How do I setup a Start-Up script that runs prior to the main g-code file running as soon as I hit CTRL-S? For example, I want to run the Auto Tool Zero routine and then turn my spindle via the SSS connected to TTL Output 1, which requires a +5VDC Signal prior to my main g-code file running.
  • How do I setup a Stop script that runs after the main g-code file is completed.? For example, I want to turn the spindle off via the SSS connected to TTL Output 1 which requires it to go from High to Low, and I want to move the spindle to the machine's origin once the main g-code file has completed.
  • How do I invert an output signal so that it is normally high instead of the default of low or in the case of a relay, its output normally open instead of closed?
  • Just to verify: A TTL Output is a digital logic output with a low signal of 0VDC and high signal of +5VDC. A Relay Output is an open/close circuit to ground that allows a current to flow from an external relay's control-circuit to ground when the Masso's relay terminal is switched to open. This requires a voltage source be attached to the external relay's (+) control-circuit input connection since the Masso's relay terminals do not provide an output voltage/signal. Is this accurate?

Thank you very much,

Philippe
 

masso-support

MASSO Support
Staff member
  1. The spindle outputs on the spindle connector are designed to automatically stop and start spindle on tool changes. So for example if your spindle is running CW at 2000 RPM:
    1. on a tool change command spindle will be stopped
    2. if auto tool zero is configured, machine will move to the auto zero position and zero the tool
    3. next the axis will go back to the machining location and start the spindle at same 2000 RPM in CW direction.


  2. So overall you wont need a custom script for for stopping and starting the spindle..
  3. To move the machine to home position, simply add G28 at the end of the gcode file.
  4. To invert any input or output simply select it in F1-Setup screen and press the space key to invert the signal, this will automatically be saved in MASSO settings.
  5. Yes TTL outputs are 0 for Low and 5v for High signals.
  6. For relay connections please see this link: https://www.masso.com.au/docs/masso...n/setup-and-calibration/relay-driver-outputs/
 

ppersaud

ppersaud
Hi,

Thank you for your response. Most of my questions are answered, but can you please tell me how I can control the Masso's outputs? Specifically, I need to control a switch by turning it on and off with a +5/ VDC signal. Additionally, I need that output to be set to +5 VDC during the initial box start-up and ideally, have a button on the screen that I can push to momentarily drop the output from +5 VDC to 0 VDC then back to +5 VDC, which will serve as a reset for my motor's drivers in the event they have a fault. This way, I don't have to power down the entire box just to clear the driver's fault status. Thank you,

Philippe
 

masso-support

MASSO Support
Staff member
For something like resetting your drives its not a good idea to do it from the controller, simply wire an external switch that resets your drives. Doing it with MASSO outputs will just make it complex and wont bring much benefit.
 

pinoy-cnc

Pinoy CNC
Quote from MASSO - Support on February 28, 2018, 10:22 am

For something like resetting your drives its not a good idea to do it from the controller, simply wire an external switch that resets your drives. Doing it with MASSO outputs will just make it complex and wont bring much benefit.

so there is no way on masso that i can wire the enable on my leadshine closeloop stepper motor? i need to wire it externally?

thanks

Rex
 

masso-support

MASSO Support
Staff member
Enable should be wired directly to the E-Stop button for safety but you can wire the alarm signals from the drives to MASSO and if one of the drive alarms out then MASSO will stop the spindle, put the machine in feedhold and display a message on the screen telling you which drive caused the alarm.
 
Top