Pico Universal Stepper - control power on output signal

More
20 Apr 2021 01:18 #206489 by dansawyer
The question is: How to setup ini files and hal files and how to control an output signal to control a solid state relay. The system is linuxcnc 2.8.0. I would like to use an output bit to drive a solid state relay to control the stepper driver power supply.
I have found the following outpur references, is this the corect section?
linksp EstopOkOut <= ppmc.0.dout.07.out
linksp SpindleFwd <= ppmc.0.dout.00.out
linksp SpindleRev <= ppmc.0.dout.01.out
#linksp SpindleUp <= ppmc.0.dout.06.out
#linksp SpindleDown <= ppmc.0.dout.05.out
linksp SpindleBrakeOn <= ppmc.0.dout.02.out
linksp MistOn <= ppmc.0.dout.03.out
linksp FloodOn <= ppmc.0.dout.04.out
If I were to redefine 05 to be something like 'linksp Gecko_Power <= ppmc.0.dout.05.out' could output pin 5 be used to drive an SSR?
If so what gcode syntax could be used to do that?
What state must the USC board be in for it to recognize the command?

Please Log in or Create an account to join the conversation.

More
20 Apr 2021 01:52 - 20 Apr 2021 01:53 #206490 by jmelson
The 12 net xxxxx lines following :
# connect e-stop write/sense to I/O controller
must not be changed. These perform the E-stop function, and there is tricky timing to get the USC board to come out of E-stop. It requires the correct order of operations set up by addf lines in univstep_load.hal, also. ppmc.0.dout.07.out is the E-stop command.

But, all other dout pins are available.for you to use. Just be sure to remove any command thet connects those pins to some output pin before connecting to the output of your choice.

When the USC is in E-stop, all douts are turned off. So, it has to be out of E-stop before any of them can be turned on.

As for G-code, then you have some standard G-codes available, like spindle forward (M03), spindle reverse (M04) and Mist coolant M07, flood coolant M08, etc.
See linuxcnc.org/docs/html/gcode.html for a quick reference on these.
M62 - M65 can be used to control digital outputs, see the above reference.

Jon
Last edit: 20 Apr 2021 01:53 by jmelson.

Please Log in or Create an account to join the conversation.

More
21 Apr 2021 00:07 - 21 Apr 2021 05:09 #206591 by dansawyer
This is beginning to come together.
I am using 2.8.0 with the Axis gui. There are two controls under the Machine tab Toggle Emergency Stop and Toggle Machine Power. It appears as though Toggle Emergency Stop clears the USC E-Stop logic and sets Brake active.
I cannot observe any change to the USC from Toggle Machine Power.. Is there a usable onboard change to the USC from Toggle Machine Power?
I observe Linuxcnc Axis requires Toggle Machine Power to active in order to process commands. I think what I am looking for is a signal from USC that can be used externally to power devices such as a VFD and a Bijur lubricating pump. Linking that to Machine Power seems like the cleanest point.
Last edit: 21 Apr 2021 05:09 by dansawyer.

Please Log in or Create an account to join the conversation.

More
21 Apr 2021 02:01 #206600 by jmelson
Yes, F2 or toggle amchine power activates the position control loops. If you just get out of E-stop, and attempt to jog an axis, nothing will happen (and you will likely get an error message). After pressing F2 or toggling to the "machine on" state, you will be able to jog axes, home axes and do other things.

The univstep_io.hal file links spindle forward (M03) to SSR1, and spindle reverse (M04) to SSR2. You can put in DC solid tate relays in those positions to activate forward and reverse motion on your VFD. (LED1 lights when SSR1 is activated, LED2 lights when SSR2 is activated).

SSR8 and LED8 are activated when out of E-stop. You could connect your lube pump to SSR8. Due to the way the I/O and E=stop work, SSR8 can't be controlled separately from out-of-estop. But, you CAN connect any other SSR to the machine-on state. Just add this to the bottom of univstep_io.hal :

net Xenable joint.0.amp-enable-out ppmc.0.dout.06.out

and it will cause SSR7 to turn on when in the machine-on state.

Niote that the SSR numbers run 1-8 while the corresponding dout pin numbers run 0-7.

Jon

Please Log in or Create an account to join the conversation.

More
21 Apr 2021 05:13 #206613 by dansawyer
One quick followup: If I were to use an M6x code to control an output does the p word use the 0-7 convention or the 1-8 convention?

Please Log in or Create an account to join the conversation.

More
21 Apr 2021 15:08 #206660 by jmelson

One quick followup: If I were to use an M6x code to control an output does the p word use the 0-7 convention or the 1-8 convention?

In the M62-M65 commands, the P word wll match the "nn" of the
motion.digital-out-nn hal pins. You then must connect those pins to the ppmc.0.dout.xx.out pins as you choose.

That would look like :

net M64-0 motion.digital-out-00 => ppmc.0.dout.04.out

This would cause an M64 P0 to turn on SSR5, and an M65 P0 to turn it off.
By default, P words from 0 - 3 are available, there is a load-time parameter to the motion controller that sets how many of these P words are configured.

Note that I have not used this, I'm just going from the docs. And, some changes to 2.8 may have caused the names of some of these pins to change.

Jon

Please Log in or Create an account to join the conversation.

More
22 Apr 2021 22:57 #206842 by dansawyer
I plan to use the on board SSR7 drive to drive an external SSR to drive main VFD power. I would connect the on board SSR drive pins to the onboard Load and Source pins. I would then connect those outputs to the external SSR.
Do you have the dirve specs for the onboard driver?

Please Log in or Create an account to join the conversation.

More
22 Apr 2021 23:46 #206846 by jmelson
I would strongly recommend AGAINST connecting anything external to the FPGA output pins that drive the SSR, if that is what you are talking about. The output is connected directly to the FPGA chip with no protection. Any transient on that wire could destroy the FPGA. Also, it is only a 3.3 V signal at 12 mA or so maximum. The SSR outputs rest at 3.3 V for off and pull down to ground to turn the SSR on. What I would recommend is to use an SSR in the SSR7 location to operate an external contactor on the mains power to the VFD. You can get the Crydom D2W202F or similar AC SSR (good for 240 V at 2 A).

Jon

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.077 seconds
Powered by Kunena Forum