Keyboard Shortcuts
Likes
Search
Controlling relays via Custom Mcode
I wish to control via relays,
Using Mach3, VB and MK4-ET V1.5 XHC Motion card., Omron 24VDC relays. The "ON" code is M704, and content is ActivateSignal(Output4) : This works The "OFF" code is M724 and content is DeActivateSignal(Output4) Does not work.!!!!! When I trip Emg Stop outputs cease, so electrically the outputs work. I have M3/M5 set to output 3 and this works. Impression is that there is an error in the syntax, or something.????? I would appreciate any learned comment on what I am doing incorrect. Many Thanks Graham |
开云体育Graham:?Most likely would be another output set to the same pin. Cant think of anything else that may do it.. Art On 1/23/2021 7:02 PM, Graham wrote:
I wish to control via relays, -- Thanks Art |
Hi Gary
Thanks for your ideas. I had opportunity to day to spend time. Using O/Ps 3,4,5 & 6. Allocating these to M3 all switch using M3/M5.? so it can all work I tried the ?turn on using (DoOEMButton(233) , this works, as did 235 etc However the turnof DoOEMButton(234)?Does not turn off., nor did 236. Totally confused. All other I/O was disabled and unplugged to elimate confusion. Is their more commands to go with the enabling DoOEM etc? I am writing his code as an Mcode using the VB editor Any ideas Regards Graham ? |
toggle quoted message
Show quoted text
Hi Gary |
开云体育I haven’t tried in in real control, at least that I remember, I tested it and watched the diao screen output leds for the outputs4 and 5 ?they did go on and off in mach3’s screen so I assumed they were working.. ? I will check further and see how I have mine setup, I run? 6 relays for the spindle 2 for forward 2 for reverse 1 for power on to the spindle controller and 1 for flood All are SSD relays, also have 2 more for switching from computer control to manual control spindle 3 relays turn on with m3 and then off with m5, and same with m4.. I have to check the computer in shop, so will get back to you as soon as I can.. ? Sent from for Windows 10 ? From: Graham
Sent: Sunday, January 31, 2021 3:05 AM To: [email protected] Subject: Re: [MachCNC] Controlling relays via Custom Mcode ? Hi Gary ? ? |
Hi Gary,
Thanks for reply. I cannot open the attachment, it tries to open a hyperlink, comes up with a black screen. I am totally confused with the behaviour of the O/Ps 3 to 8 that I am using. If I allocate M3 to any of these the M3/M5 work correctly. The VB code in Mcode looks correct. The On command workd using Activate or OemActivate. But will not turn off on command. Really fustrating as I have litle model aircraft parts I am ready to machine and very limited time at moment as I am loking after m wife who is on a chemo round. Anyway we keep trying?? eh. Regards Graham |