setting up estop, stepper driver enable, ...

More
27 Feb 2020 13:45 - 03 Mar 2020 15:39 #158637 by Christoph
Hi,

I am building a plasma cutter using a Mesa 7i76e card, a Raspberry Pi 4, and stepper motors without encoders. I could not use the pncconf wizzard because it does not work on the Raspberry Pi, so I tried editing the ini and hal files by myself:

File Attachment:

File Name: custom_202...03-2.ini
File Size:5 KB

File Attachment:

File Name: custom_202...03-2.hal
File Size:7 KB


The axis work fine, the homing sequence too, and I have executed the example gcode successful. Now I want to implement the safety features before I start the PlasmaC installation and configuration, but I don't know which signals and pins I have to use for my purpose.

I use the following inputs and outputs on the Mesa card:

Input 9: External emergancy stop button
Input 8: Safety cabin door open
Input 10: Torch lost (e.g. because of collision with material)

Output 3: Stepper driver enable
Output 4: Plasma on
Output 5: External Relais 1 (indicates "Machine is ON")
Output 6: External Relais 2 (indicates "Program is paused")
Output 7: External Relais 3 (indicates "Emergancy Stop is pressed")

I want the following:

1. When I start LinuxCNC
-> Machine is OFF (via F2)
-> Motor drivers are disabled (Output 3)

2. When I enable the machine via F2
-> enable Motor drivers
-> switch on Relais 1

3. When the Safety cabin is opened OR the torch is lost
-> Pause the Program (P).

4. A resume (S) should only be possible via the GUI.

5. When the Program is paused
-> Plasma is disabled (Output 4)
-> switch on Relais 2

6. When the external Emergancy stop button is pressed
-> Activate Emergancy Stop F1
-> Disable motor drivers (Output 3)
-> Disable plasma (Output 4)

7. When the external Emergancy stop button is released
-> Machine is in state OFF


Can you help me archieving that? Most of the features are as I want them to be by default (like 4 or 7), but for example I can't get it to work that the motor drivers are disabled when the machine is OFF, and only enabled if the machine is ON...

Best,
Christoph
Attachments:
Last edit: 03 Mar 2020 15:39 by Christoph.

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

More
27 Feb 2020 22:34 - 27 Feb 2020 22:34 #158693 by andypugh

I am building a plasma cutter using a Mesa 7i76e card, a Raspberry Pi 4, and stepper motors without encoders. I could not use the pncconf wizzard because it does not work on the Raspberry Pi


I haven't tried Pncconf on the Pi, but that surprises me.

1. When I start LinuxCNC
-> Machine is OFF (via F2)
-> Motor drivers are disabled (Output 3)

look for HAL pins called either axis.N.amp-enable-out (v2.7) or joint.N.amp-enable-out (v2.8+) to control the drive enables

3. When the Safety cabin is opened OR the torch is lost
-> Pause the Program (P).
4. A resume (S) should only be possible via the GUI.



Maybe motion.feed−inhibit (though that resumes when the pin goes false. You might want to set up a HAL toggle to the GUI. Otherwise there is motion.enable, but that would turn the machine off.
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html

5. When the Program is paused
-> Plasma is disabled (Output 4)
-> switch on Relais 2


Logic using halui.program.is−paused maybe?
linuxcnc.org/docs/2.7/html/man/man1/halui.1.html

6. When the external Emergancy stop button is pressed
-> Activate Emergancy Stop F1
-> Disable motor drivers (Output 3)
-> Disable plasma (Output 4)



Probably the right pin for that is motion.enable
Last edit: 27 Feb 2020 22:34 by andypugh.

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

More
27 Feb 2020 23:44 #158701 by PCW
I just tried and pncconf runs fine on a RPI4, what issue did you have?

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

More
01 Mar 2020 22:18 #158916 by Christoph
Thanks andypugh! I will try that when I am at the machine on Thuesday (I only have access to the machine twice a week...)

About the problem with the Raspberry Pi: Some libraries for gtk2 glade were missing and I could not install them on the Raspberry. I made a topic in the pncconf section of the forum: forum.linuxcnc.org/39-pncconf/38339-how-...ll-and-start-pncconf

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

More
03 Mar 2020 17:15 #159088 by Christoph

I just tried and pncconf runs fine on a RPI4, what issue did you have?


Most python tools like pncconf.py and configurator.py (for PlasmaC) fail at importing gtk.glade.
Which OS do you use on the Raspberry?
I use "4.19.50-rt22-v7l #1 SMP PREEMPT RT Tue Feb 4 11:39:12 CET 2020 armv7l GNU/Linux"
How did you manage to install gtk.glade?

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

More
05 Mar 2020 15:53 #159266 by andypugh

Most python tools like pncconf.py and configurator.py (for PlasmaC) fail at importing gtk.glade.
Which OS do you use on the Raspberry?


You could try installing glade to see if it brings in the other dependencies, looking at
archive.raspbian.org/raspbian/dists/bust...inary-armhf/Packages (very big text file)
glade is available.

maybe also python-gtk2 and python-glade2 ?

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

Time to create page: 0.133 seconds
Powered by Kunena Forum