Thanks guys,
your comments helped a lot.
outputs have no port and pin address
Confirmed. In UCCNC you assign a variable to the analog 2 Output. Then giving the variable an Integer between 0-65535 yields an output on the AO2 PIN.
analog voltage will be proportional to the PWM signal
confirmed. Unfortunately the analog outs of the UB1 Board only provide a voltage, not a PWM-Pulse.
By now I've realized, that all ouputs-Pins of the UB1 board are fast enough to generate a PWM-Signal. This could suffice for me, because my laser is powered separately.
I've assigned the PWM-PIN of the Spindle to Pin 17 of Port 3. I gave the spindle a maximum speed of 100 and did not use a pulley.
Then connected the Y317 PIN to the 5V source with a 1kOhm resistor and measured a Signal between Y317 and a 0V-PIN. Duty cycle is fine. The voltage however does not remain "neutral". It drifts upwarts with increased duty time.
M3 S50 give's a nice 50% PWM-Signal from -2.5 to +2.5V. When using M3 S80 the PWM-Signal ranges from approx -0.5V to 4.5V. Haven't yet figuret out why and I'm not shure, whether that will remain when connecting the actual Laser instead of the resistor or if it will be a problem.
I may use separate UCCNC Profiles for Laser engraving an milling, but I'd rather not have to rewire anything everytime I mount the laser.
Since I do not intent to have the spindle rotating backwards, I may use M4 to generate the PWM-Signal for the Laser, without the spindle turning
What I'm stuck with for now, is how to set up UCCNC in order to use the M10/M11 commands. Assigning a PIN to the M10.1 command and fiddeling around with M3/M5, M10/M11 and G1 commands in the MDI does not switch any outputs.
Am I right in assuming, that I first have to enter a M3 respectively M4 command to start generating a PWM-Pulse?
M10 Q255 should then give a 100% PWM-Signal.
Will the M10 command enable the PIN instantly, or only whilst an axis is moving?
Will the PIN, that is driven by the M10-Command, have the PWM-Signal, or do I have to think of it as a "Enable" signal and use a Relay-PIN, that routes the PWM-Pulse to the laser?
I can't beleive, that I'm having such a hard time getting the Laser wired and firing and I'm looking forward to your answers.