second hand cnc from 2007,could use help with pwm on odd control board

More
28 Nov 2022 19:54 #257889 by beau
I have a second hand cnc I bought recently. after struggling with confirming what functions and doesn't I worked out mach three wasnt up to the task. switched to linuxcnc and after reading research and alot of trial and error I have gotten the largest issues solved. decent latency, movement of all axis, homing of all axis, past a certain amount of getting in my own way and working out that I didnt know what I didn't know. I now can run basic programs and example files ,and I can turn the spindel on and off manually and with programs. I have not been able to do anything about speed tho. so I have changed options in my vfd to manually change speed with the potentiometer on the face plate. I could just go on as is but ive read of one other forum member describing what I believe to be the same machine or similar enough to mine that his fix would be relevant to mine. 

excitech 0609 24×36 . sold under the brand cam-wood 203. 

it was either sold as a dsp control mill or was adapted by the " manufacturer " tigertec " into a mach3 machine before I came to me. the lower control board is still the dsp interface board rznc type. it has a pmdx 122 and a small board made by tigertec.  a user geert sorry if I misspelled that has a post about running the spindel with the 8 speeds from 3 inputs on his board. I would be happy to gain at least that funtion, I would like to be able to use 0-10v pwm with the setup I have.  and if im being realy ambitious it would be nice to have option to do the pwm control and the potentiometer control that im currently useing. or easily switch back and forth. id appreciate any help anyone can offer. like I said I could continue like it is but im eager to learn as much as I can about linuxcnc either way.
Attachments:

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

More
28 Nov 2022 20:03 #257890 by tommylight
Printer port or Mesa?
Some Mesa boards have spindle control that replaces that potentiometer, the 0-10V, and that is fairly easy to wire and use.
The pin control should be also doable in hal.

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

More
28 Nov 2022 20:20 #257891 by beau
printer port. im not positive that it has to be done via pwm it has 4 speed inputs that can do start plus 7 speeds on the lower board. that used to be half of the dsp setup. ill try and post all the info ,schematics model numbers etc after work today if anyone is interested. I have been tempted to try a few different things and wire it up using all four inputs but im sceptical cause I dont want to damage something experimenting so near to having it at 100%.

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

More
29 Nov 2022 03:59 #257938 by spumco
If you have any outputs left on the PMDX-122, the electrical specs claim the outputs are good up to 1mhz.

I don't how fast a parallel port can work reliably, but it might be possible to use one of 122's outputs as a PWM signal to the VFD.  See what your VFD can accept as a PWM signal (i.e. frequency) and you might be good to go.

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

More
29 Nov 2022 12:24 #257963 by tommylight
Get an "arduino relay board", those are 5V, with 4 relays, they work with alnost all parallel ports and usually come wired as "active low" meaning they activate when an input is tied to ground.
From parallel port outputs to relay board inputs, and relay outputs to the control board.

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

More
29 Nov 2022 13:08 - 29 Nov 2022 13:10 #257968 by andypugh

printer port. im not positive that it has to be done via pwm it has 4 speed inputs that can do start plus 7 speeds on the lower board.

 
Do you know if these inputs are parallel-port compatible? 

I will assume that the control board takes an enable and three binary bits.

There are several ways to control the bits. My natural instinct is to do it in HAL with converting the spindle speed commands to an integer with suitable scaling, and then pulling out the individual bits. 

But in this case it might be better to use a G-code remap of the "S" command. 
Read through the following first to decide if you prefer this to a HAL solution

There is far more docs here than you need so take this as "for reference only"
linuxcnc.org/docs/stable/html/remap/remap.html
However, you will need to carry out the steps in Section 4, including adding a [PYTHON] section to your 

LinuxCNC G-code supports digital outputs which drive the HAL pins motion.digital-out-00 to -03 (and can be increased to -63) 
You would need to connect these in HAL to parallel port output pins (do you have enough left?)
Then, every time LinuxCNC sees a "S" command in the G-code it will call the remapped subroutine below.
One reason to do it this way is that it allows you to customise the speed ranges and bit patterns easily. 

In the INI, in the [RS274NGC] section add
REMAP = S prolog=setspeed_prolog ngc=spindle

Now create a file called "spindle.ngc" somewhere. I would suggest in the config folder (ie, the same folder as the INI). But that might need you to add "./" to the SUBROUTINE_PATH (also in the INI)

Initially, for testing, use this for your spindle.ngc
O<spindle> SUB
(debug, Entered spindle.ngc)

O100 IF [#<speed> GT 10000]
  M64 P0
  M64 P1
  M64 P2
O100 ELSEIF [#<speed> GT 8000]
  M64 P0
  M64 P1
  M65 P2
O100 ELSEIF [#<speed> GT 6000]
  M64 P0
  M65 P1
  M64 P2
O100 ELSEIF [#<speed> GT 4000]
  M64 P0
  M65 P1
  M65 P2
(more of the same)
O100 ELSE
  M65 P0
  M65 P1
  M65 P2
O100 ENDIF
O<spindle> ENDSUB
M2

On balance, the HAL-only approach might actually be easier :-)
Last edit: 29 Nov 2022 13:10 by andypugh.

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

More
29 Nov 2022 14:04 #257979 by beau
so here are some screens of the rznc manual for more info. it is currently wired like the 2 example. 

so I could use say "pin 3" on my pdmx 122 as pwm out. and connect that straight to my vfd on the avi terminal. and leave the wiring as is in example 2. ( pin 2 is working as spindel on and forward at the moment with the vfd faceplate controlling the speed.)
so if im understanding correctly that would allow me to have a variable speed bypassing the rznc control all together as far as spindel speed is concerned, and just use the on/fwd as is? 

and thanks for you time and response its really appreciated. 
Attachments:

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

More
29 Nov 2022 14:12 #257982 by beau
here is more screens of relevant vfd manul. would it be nessacary to even consider hooking this us through use of the multi speed connections like shown on the vfd and the rznc board . 

I geuss im asking if ill have the best functionality by just having pwm control and not to be concerned with the other options correct?

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

More
29 Nov 2022 15:13 #257985 by spumco
Forget the PWM plan... a quick glance at the attached manual and I don't think your VFD can accept PWM signals to set frequency.  Looks like it only takes 0-10v or 4-20ma.  You'd need a PMDX-106 or -107 spindle control card to convert PWM to 0-10v.... except your PMDX-122 doesn't have the expansion port to use one of those.

It does appear to have RS-485 input, so maybe you can see if there's a modbus chapter/section of the manual?  I'm not a fan of modbus spindle control, but you aren't doing spindle synchronization so you could have discrete on/off fwd/rev inputs and just control speed with modbus.

If not, Tommy & Andy's suggestions are likely the path to glory.

Or... here's a thought... rip all the electronics out and start fresh with non-obsolete components that work together and have decent user manuals.

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

More
29 Nov 2022 17:00 #257996 by beau
I would prefer to have a mesa 7i96. but they have been either out of stock or double priced for some time. it has a second control board below the pmdx 122 and at this point it is doing everything it needs to do and at good speeds. the control board has the ability to do up to 8 speeds and this post started because I had read another user here talking about how he had solved his issues with the same setup. I was told I should start my own post about it.

I was maybe confused by what the pwm actually does it seems. yes my vfd supports 0 -10v frequency control. I am not hung up or stuck on any particular solution. if I can control my spindel speed within linuxcnc ( via sliders ,overrides , etc and if I run a file that has a speed command in it I would like my machine to function normally.

I am using the potentiometer on the vfd and probably would do fine for most of my jobs but if there is a way to have better control than of course I would prefer to take advantage of it.

the speed thing is really all I have left to figure out so I really can't justify going the mesa route at this point over just the one small issue.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum