Fast Hole EDM from Hacked Parts
- IronManDylan
- Offline
- Premium Member
Less
More
- Posts: 128
- Thank you received: 20
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: 128
- Thank you received: 20
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: 128
- Thank you received: 20
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: 128
- Thank you received: 20
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: 17899
- Thank you received: 4774
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: 128
- Thank you received: 20
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.
Time to create page: 0.064 seconds