Fast Hole EDM from Hacked Parts
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
20 Dec 2024 21:03 #317061
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
PCW,
SSR! That worked! Thank you! Well it worked to the extent that the LED is coming on but has not turned the relay on and I am still reading 0 voltage. I was looking through the manual, do these pins need there own power supply? If so, does it get input through one of these pins or somewhere else??
Best,
-Dylan
SSR! That worked! Thank you! Well it worked to the extent that the LED is coming on but has not turned the relay on and I am still reading 0 voltage. I was looking through the manual, do these pins need there own power supply? If so, does it get input through one of these pins or somewhere else??
Best,
-Dylan
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
20 Dec 2024 21:48 #317062
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
Okay, okay, I see now. Theses are not really outputs, they are really a switch (which is controlled by an output). So I'll order a buck converter to drop the 48Vs I already have installed down to the 12v I am going to use to drive things.
The naming convention on the pin is setp hm2_7i96s.0.ssr.00.out-00 0 (00 is the pin num and the lagging 0 turns the pin off).
I am going to try to get the software to boot with the proper hal code and will report back.
The naming convention on the pin is setp hm2_7i96s.0.ssr.00.out-00 0 (00 is the pin num and the lagging 0 turns the pin off).
I am going to try to get the software to boot with the proper hal code and will report back.
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
20 Dec 2024 21:57 #317063
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
Okay so the config successfully boots with the following code in .hal:
setp hm2_7i96s.0.ssr.00.out-00 true
net edm-pump-output <= motion.digital-out-00
net edm-pump-output => hm2_7i96s.0.ssr.00.out-00 true
So if motion.digital-out-00 is set to true (which is what I am trying to do with the M101) the pumps should turn on. This makes sense to me now. However I am not sure if motion.digital-out-00 is the correct 'thing' to use here.
I also believe that I need to do something in the .ini file. What I was trying was:
REMAP=M101 modalgroup=6 python=none
REMAP=M102 modalgroup=6 python=none
I take it that this sets up the user defined mcode. But I get an error when I try to post it of: 'none' is not a python callable func. I will mess more with this and also try taking out 'chmod +x M101' and will report back. But if you have any suggestions please let me know.
Best,
-Dylan
setp hm2_7i96s.0.ssr.00.out-00 true
net edm-pump-output <= motion.digital-out-00
net edm-pump-output => hm2_7i96s.0.ssr.00.out-00 true
So if motion.digital-out-00 is set to true (which is what I am trying to do with the M101) the pumps should turn on. This makes sense to me now. However I am not sure if motion.digital-out-00 is the correct 'thing' to use here.
I also believe that I need to do something in the .ini file. What I was trying was:
REMAP=M101 modalgroup=6 python=none
REMAP=M102 modalgroup=6 python=none
I take it that this sets up the user defined mcode. But I get an error when I try to post it of: 'none' is not a python callable func. I will mess more with this and also try taking out 'chmod +x M101' and will report back. But if you have any suggestions please let me know.
Best,
-Dylan
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
20 Dec 2024 22:50 #317066
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
Okay, it sounds like the info I was putting in the .ini folder was unnecessary so I removed it.
I got my mcode into the right location, for anyone struggling with this in the future it needs to be in the location that is given by 'PROGRAM_PREFIX' in the .hal file.
So now when I put m101 into MDI absolutely nothing is happening. This is what I have in the .hal:
setp hm2_7i96s.0.ssr.00.out-00 true
net edm-pump-output <= motion.digital-out-00
net edm-pump-output => hm2_7i96s.0.ssr.00.out-00
And this is what I have in the M101 file:
#!/bin/bash
halcmd setp motion.digital-out-00 1
#chmod +x M101
exit 0
Notice chmod +x M101 is commented out.
Does anyone know why this is not working? Thank you.
I got my mcode into the right location, for anyone struggling with this in the future it needs to be in the location that is given by 'PROGRAM_PREFIX' in the .hal file.
So now when I put m101 into MDI absolutely nothing is happening. This is what I have in the .hal:
setp hm2_7i96s.0.ssr.00.out-00 true
net edm-pump-output <= motion.digital-out-00
net edm-pump-output => hm2_7i96s.0.ssr.00.out-00
And this is what I have in the M101 file:
#!/bin/bash
halcmd setp motion.digital-out-00 1
#chmod +x M101
exit 0
Notice chmod +x M101 is commented out.
Does anyone know why this is not working? Thank you.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18407
- Thank you received: 5025
21 Dec 2024 01:43 #317070
by PCW
Replied by PCW on topic Fast Hole EDM from Hacked Parts
setp hm2_7i96s.0.ssr.00.out-00 true
Doesn't make much sense here as the output is controlled by
edm-pump-output
Doesn't make much sense here as the output is controlled by
edm-pump-output
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
21 Dec 2024 06:00 #317077
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
PCW,
Thank you. Sorry for the crazy number of posts today. I was trying to keep things up to date and wasn't sure which problems I would figure out and which I wouldn't be able to.
This is what I have in M101:
#!/bin/bash
halcmd setp hm2_7i96s.0.ssr.00.out-00 1
chmod +x M101
exit 0
I also have this in the .ini file. But I understand how its unnecessary so maybe I'll remove it:
setp hm2_7i96s.0.ssr.00.out-00 false
This is now working to turn the pumps on and I have a code similar to M101 called M102 that turns them off.
The base of all this code came form chatgpt. Chatgpt can do porgraming in C pretty well from what I've seen. But it struggles on LinuxCNC obviously, gave me a bunch of unnecessary stuff.
So I am going to get some of the other things that need similar control working, work on the post processor and get the buck converter set up. This might take few days as I am celebrating Christmas tomorrow.
In the meantime, does anyone have any idea how I should program the PID loop based on the PWM signal? Has anyone written a program like this in LinuxCNC before? I can get the M52 Pn command into my post processor but I dont have a clue how to do the PID loop right now. I am wondering if it needs to be written in the .ini file, should it be a script thats written in python and placed somewhere else, or...?
Thank you and best,
-Dylan
Thank you. Sorry for the crazy number of posts today. I was trying to keep things up to date and wasn't sure which problems I would figure out and which I wouldn't be able to.
This is what I have in M101:
#!/bin/bash
halcmd setp hm2_7i96s.0.ssr.00.out-00 1
chmod +x M101
exit 0
I also have this in the .ini file. But I understand how its unnecessary so maybe I'll remove it:
setp hm2_7i96s.0.ssr.00.out-00 false
This is now working to turn the pumps on and I have a code similar to M101 called M102 that turns them off.
The base of all this code came form chatgpt. Chatgpt can do porgraming in C pretty well from what I've seen. But it struggles on LinuxCNC obviously, gave me a bunch of unnecessary stuff.
So I am going to get some of the other things that need similar control working, work on the post processor and get the buck converter set up. This might take few days as I am celebrating Christmas tomorrow.
In the meantime, does anyone have any idea how I should program the PID loop based on the PWM signal? Has anyone written a program like this in LinuxCNC before? I can get the M52 Pn command into my post processor but I dont have a clue how to do the PID loop right now. I am wondering if it needs to be written in the .ini file, should it be a script thats written in python and placed somewhere else, or...?
Thank you and best,
-Dylan
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
27 Dec 2024 18:16 #317495
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
Hi,
I have made some progress and have successfully connected a python script to my machine. This script right now is just turning a LED on and off but I will use it in the future to run my PID loop on my feedrate.
I have run into a problem though. I am trying to get the PWM signal into my software using hal, but when I used mesaflash --read I am getting the name on pin 29 (this is the pin that is supposed to read the PWM signal according to Peter) of (unknown-gtag-200).
It seems like this error means that the name is not set correctly, but that it might still be possible to read the pin. However, I do not know how to find the hal name of this pin. I was only able to find the hal name of the ssr pin because of you PCW. I feel like there should be a list somewhere that gives the hal names and associated physical pin numbers...
I would greatly appreciate any guidance. Thank you.
Best,
-Dylan
I have made some progress and have successfully connected a python script to my machine. This script right now is just turning a LED on and off but I will use it in the future to run my PID loop on my feedrate.
I have run into a problem though. I am trying to get the PWM signal into my software using hal, but when I used mesaflash --read I am getting the name on pin 29 (this is the pin that is supposed to read the PWM signal according to Peter) of (unknown-gtag-200).
It seems like this error means that the name is not set correctly, but that it might still be possible to read the pin. However, I do not know how to find the hal name of this pin. I was only able to find the hal name of the ssr pin because of you PCW. I feel like there should be a list somewhere that gives the hal names and associated physical pin numbers...
I would greatly appreciate any guidance. Thank you.
Best,
-Dylan
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18407
- Thank you received: 5025
27 Dec 2024 18:33 #317498
by PCW
Replied by PCW on topic Fast Hole EDM from Hacked Parts
The "unknown gtag" error means that your mesaflash is not up to date enough
to know about the periodm. This has no real significance.
To list all mesa hardware pins/parameters, with LinuxCNC running, in a terminal, type:
halcmd show all hm2
you can re-direct this to a file with:
halcmd show all hm2 > all-mesa.txt
if you just want periodm pins:
halcmd show all | grep periodm
to know about the periodm. This has no real significance.
To list all mesa hardware pins/parameters, with LinuxCNC running, in a terminal, type:
halcmd show all hm2
you can re-direct this to a file with:
halcmd show all hm2 > all-mesa.txt
if you just want periodm pins:
halcmd show all | grep periodm
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
-
Less
More
- Posts: 151
- Thank you received: 22
27 Dec 2024 19:39 - 27 Dec 2024 19:40 #317504
by IronManDylan
Replied by IronManDylan on topic Fast Hole EDM from Hacked Parts
PCW,
Thank you for the response. Good to know that the gtag is not a concern. I have attached a file of the output of 'halcmd show all hm2' (there is some funky text in it for some reason so there's actually two files where I copied and pasted the output into the second one). 'halcmd show all | grep periodm' did not output anything for some reason..
I am looking though these pins and still nothing stands out to me as obviously the pin 29 I am looking for.. Do you mind taking a look and telling me what you see? Am I missing something how to tell which pins are physical pins?
Best,
-Dylan
Thank you for the response. Good to know that the gtag is not a concern. I have attached a file of the output of 'halcmd show all hm2' (there is some funky text in it for some reason so there's actually two files where I copied and pasted the output into the second one). 'halcmd show all | grep periodm' did not output anything for some reason..
I am looking though these pins and still nothing stands out to me as obviously the pin 29 I am looking for.. Do you mind taking a look and telling me what you see? Am I missing something how to tell which pins are physical pins?
Best,
-Dylan
Attachments:
Last edit: 27 Dec 2024 19:40 by IronManDylan.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18407
- Thank you received: 5025
27 Dec 2024 21:21 #317511
by PCW
Replied by PCW on topic Fast Hole EDM from Hacked Parts
Looks like you are possible running too old of a LinuxCNC version to support the periodm
though in this case, LinuxCNC should report an unknown module number.
Here's what I get for periodm pins and parameters on the 7I96S
halcmd show all | grep periodm
35 u32 I/O 0x00000001 hm2_7i96s.0.periodm.00.averages
35 float OUT 0 hm2_7i96s.0.periodm.00.duty_cycle
35 float IN 0 hm2_7i96s.0.periodm.00.duty_cycle_offset
35 float IN 100 hm2_7i96s.0.periodm.00.duty_cycle_scale
35 float IN 1 hm2_7i96s.0.periodm.00.filtertc_us
35 float OUT 0 hm2_7i96s.0.periodm.00.frequency
35 bit OUT FALSE hm2_7i96s.0.periodm.00.input_status
35 bit I/O FALSE hm2_7i96s.0.periodm.00.invert
35 float IN 1 hm2_7i96s.0.periodm.00.minimum_frequency
35 float OUT 0 hm2_7i96s.0.periodm.00.period_us
35 bit OUT FALSE hm2_7i96s.0.periodm.00.valid
35 float OUT 0 hm2_7i96s.0.periodm.00.width_us
though in this case, LinuxCNC should report an unknown module number.
Here's what I get for periodm pins and parameters on the 7I96S
halcmd show all | grep periodm
35 u32 I/O 0x00000001 hm2_7i96s.0.periodm.00.averages
35 float OUT 0 hm2_7i96s.0.periodm.00.duty_cycle
35 float IN 0 hm2_7i96s.0.periodm.00.duty_cycle_offset
35 float IN 100 hm2_7i96s.0.periodm.00.duty_cycle_scale
35 float IN 1 hm2_7i96s.0.periodm.00.filtertc_us
35 float OUT 0 hm2_7i96s.0.periodm.00.frequency
35 bit OUT FALSE hm2_7i96s.0.periodm.00.input_status
35 bit I/O FALSE hm2_7i96s.0.periodm.00.invert
35 float IN 1 hm2_7i96s.0.periodm.00.minimum_frequency
35 float OUT 0 hm2_7i96s.0.periodm.00.period_us
35 bit OUT FALSE hm2_7i96s.0.periodm.00.valid
35 float OUT 0 hm2_7i96s.0.periodm.00.width_us
Please Log in or Create an account to join the conversation.
Time to create page: 0.308 seconds