UB1 AO2 (analog out 2) address

This Section is for users to discuss hardware

UB1 AO2 (analog out 2) address

Postby TschortschCNC » Tue Apr 09, 2024 5:54 pm

Hi all

My selfmade machine kept on stopping when using the laser and when probing. So I'm about to exchange the MK6-V-II for a UC300ETH on a UB1 and switch from Mach3 to UCCNC.

I’ve figured out how to wire the inverter, sensors, drives etc. But don't know where to get a PWM-Signal for the laser.

According to the user-manual of the UB1, the board has two analog outputs. And if I understand correctly, both can provide a PWM signal.

Here's an printscreen of the manual https://drive.google.com/file/d/18w9HiCQHFZq26sZAZbcKvo0OblD9YPOz/view?usp=sharing

Wow can I address the analog output 2? What are PIN and PORT of AO2?
TschortschCNC
 
Posts: 2
Joined: Tue Apr 09, 2024 5:47 pm

Re: UB1 AO2 (analog out 2) address

Postby cncdrive » Tue Apr 09, 2024 11:14 pm

Analog outputs produces analog voltage.
You can configure the spindle PWM and then you can select the analog output channel to attach to it.
Then the analog voltage will be proportional to the PWM signal duty cycle calculated by the controller.

For laser you could use the laser PWM output, you just have to configure the laser output pin according to your connection.
cncdrive
Site Admin
 
Posts: 4741
Joined: Tue Aug 12, 2014 11:17 pm

Re: UB1 AO2 (analog out 2) address

Postby ger21 » Wed Apr 10, 2024 11:19 am

What are PIN and PORT of AO2?

Analog outputs don't have port or pin numbers, I believe they are just selected by choosing 1 or 2.
If you're using the UB1, you should be asking CNC Room, as it's their product you are interfacing with.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2679
Joined: Sat Sep 03, 2016 2:17 am

Re: UB1 AO2 (analog out 2) address

Postby cncdrive » Wed Apr 10, 2024 1:09 pm

Yes, analog outputs have no port and pin address, they have channels only, if your UB1 has channel 1 and 2 then you can select those channels in the settings in the UCCNC where analog output is available for a function.
cncdrive
Site Admin
 
Posts: 4741
Joined: Tue Aug 12, 2014 11:17 pm

Re: UB1 AO2 (analog out 2) address

Postby TschortschCNC » Wed Apr 17, 2024 10:20 am

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.
TschortschCNC
 
Posts: 2
Joined: Tue Apr 09, 2024 5:47 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests