[Home]Pico Systems PWM Controller

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Difference (from prior major revision) (no other diffs)

Changed: 7,11c7,9
Unfortunately, the BDI CD's of EMC do not support this board.
The best way to set it up right now is to use the BDI-Live! rc46 CD or one of the net mirrors
with the ISO image of that CD to install Linux and EMC on your computer, then update it with this
file : http://jelinux.pico-systems.com/codes/update.tgz
Further instructions for applying this update are at http://jelinux.pico-systems.com/update.html
Early BDI CD's of EMC do not support this board.
The best way to set it up right now is to use the BDI 4.30 CD or one of the net mirrors
with the ISO image of that CD to install Linux and EMC on your computer.

Changed: 15,16c13
and recompile it. This is not for the faint of heart! Otherwise, I can add the files
to your hard drive if you send it to me.
and recompile it. This is not for the faint of heart!

Changed: 120,121c117
a version of gnuplot with X-11 support. If you have used my update.tgz file to
install the EMC updates, this is already taken care of. Otherwise, get gnuplot-4.0.0, you can download this as
a version of gnuplot with X-11 support. Get gnuplot-4.0.0, you can download this as

The Pico Systems PWM Controller board controls up to 4 servo axes powered by a servo drive that accepts a PWM drive signal. (Several boards can be "daisy-chained" together, if needed, on one parallel port, to handle more than 4 axes. The EMC driver doesn't currently support over 4 axes, if anyone needs this feature, let me (Jon Elson at mailto://elson@pico-systems.com ) know, and I'll get it working for you.)

Early BDI CD's of EMC do not support this board. The best way to set it up right now is to use the BDI 4.30 CD or one of the net mirrors with the ISO image of that CD to install Linux and EMC on your computer. I can also provide a complete computer with the proper drivers added to EMC and completely configured for the controller. Linux gurus can download the original source of EMC (not EMC2) from the SourceForge repository and recompile it. This is not for the faint of heart!

This board produces constant-frequency pulses of varying pulse width to regulate the speed and torque of the servo motors. It also produces a direction signal to tell the motor which direction to move in.

This board also has 4 axes of 24-bit encoder counters to read position from the encoders. EMC will sign-extend and overflow the 24-bit count to a floating-point value of practically unlimited range in a floating "long" variable, so the 24-bits of hardware counter are not a practical limit. The digital filter on the encoder inputs limits the encoder count rate to roughly 300,000 counts/second (per axis). If you should need a higher count rate, a simple change can allow this to be increased.

The board also has 16 opto-isolated digital inputs and positions where up to 8 solid state relays can be installed. SSR 8 is turned on whenever EMC is out of estop. Digital Inputs 14 and 15 need to be connected together (15 causes an e-stop, 14 informs EMC whether it is safe to get out of estop or not.) These input pins can be wired through any N.C. overtravel switches, manual E-stop (N.C.) switches and axis fault circuits (again, N.C.) and then connected to the pin marked EG (external ground). When the entire chain is a closed circuit, the green LED will light, and EMC will know it is OK to come out of estop. The other SSR positions are controlled by EMC, and can be assigned in the ini file to particular fucntions, such as spindle, coolant, etc. Some of the digital inputs are assigned by hard-coding to axis limit and home switches.

This board is interfaced to the PC through an EPP parallel port. An IEEE-1284 compliant cable must be used. I have tested it with 2', 6' and 10' cables. I have observed communications errors with a 15' cable, so you should not try to use more than 10' of cable. I have had much trouble getting this board to work with random Taiwan motherboards, due to poor operation of the EPP IEEE-1284 communication mode of certain parallel port chips. I have never had a problem EVER with Dell motherboards. I have also seen the SMC37C665, 37C666 and 37C669 family of chips work fine. The Winbond W83977TF-AM chip on a Supero motherboard has also worked fine when set to EPP mode. The UMC chips have not worked at all, and the timing of the signals clearly demonstrates serious problems with the chip or the integration of the chip to the motherboard. Don't even try with these!

I have also gotten it to work with the PCI4008A chip used on some PCI plug-in parallel port boards. Watch out for Comp USA, as they sell several different PCI parallel port boards under the SAME SKU number, and they have different chips. The ITE8875F chip does not work. I have also tried the NetMos board, and had no luck with that one, either.

One other quirk: On the Dell computers, you have to force the parallel port to EPP mode with the pcisetup program. This is available at http://jelinux.pico-systems.com/codes/pcisetup You would run this from the current directory on the first parallel port with this command :
./pcisetup 378 where 378 is the parallel port's data register in hexadecimal. (Don't enter it as 0x378, this program doesn't have a parser to handle the 'x'.) This program has to be run as root, or with the sudo command, as :
sudo ./pcisetup 378

(I'll be glad to put EMC on a used Dell PC and supply that with the boards to prevent these sorts of disasters.)

I have a diagnostic program (currently separate from EMC, avaliable for download from the UPC web page at http://jelinux.pico-systems.com/univpwm.html , look for "Download Linux Diagnostic Program..."

First, you want to run it to check if the board can even be seen :
./pwmdiags bus

Again, this program needs to be run as root, or with sudo. You should get a report of 15 possible addresses, and the first one should read
PWM Controller at 0x10, Ver 1
address 0x20 will be skipped, since this address group is also occupied by the PWM controller, and then addresses 0x30 through 0xF0 will show up as "No Board". If you get all "No Board" or "Unknown" responses, then the communication is not working, the board is not plugged into the right parallel port, or the board was not powered on properly. When you power the board on, the red "Load Fail" light should blink on for about 1/4 second, and then go out. If it doesn't do this, the FPGA did not load its configuration correctly from the serieal PROM, for some reason.

If the bus test has run correctly, then run the communications test : ./pwmdiags commtest

You should get a report like :
1000 cycles completed, no errors
2000 cycles completed, no errors
3000 cycles completed, no errors

Let this run for 100,000 cycles (about 30 seconds) to see if any errors show up. If you have encoders connected, they can cause errors if they dither between adjacent states, so you may want to unhook them. If you get 100,000 test cycles without any errors, you can be pretty confident the computer and UPC board are communicating well.

From the UPC web page, you can download a sample ini file which will configure EMC for the UPC board. You will still have to set the INPUT_SCALE parameter for each axis to correspond to the number of encoder counts per user unit for that axis. If the axis counts the wrong way when you move it, change the sign of INPUT_SCALE. Set the P parameter to a small value, such as 100. Hit F1 to power up the servo amps and then F2 to activate the positioning loop. If it runs away, hit F1 to stop motion. Edit the ini file and change the sign of OUTPUT_SCALE from 1.0 0.0 to -1.0 0.0 (or vice versa) and try again. It should now attempt to hold position, and roughly follow the commanded position when you jog slowly. You now have to "tune" the servo loop!

First, you need to get the plotting package working. The plotting package included on the BDI-Live! and some other BDI CDs is not the X-windows version, so you need to download a version of gnuplot with X-11 support. Get gnuplot-4.0.0, you can download this as source from the gnuplot web site and compile it yourself. Basically, use ./configure, make, make install, and it needs no massaging of the scripts (a major miracle)!

Once you've gotten the gnuplot working on the X screen, you can then click on settings, logging, and start the logging function. Make a move, then click stop, save, plot in that order, and a new window should pop up with a graph of the move. (There's some fancy mouse work needed here. You start the logging, move to the TkEmc window and click to set "kbd/pointer focus" to EMC, then move the cursor over the stop button on the logging window. hit appropriate keys to jog, and click the mouse at the end of the move to stop the log.)

The IniFile for the PWM controller.

Tuning the PWM controller with Pico Systems PWM servo amplifiers.


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited December 8, 2005 7:31 pm by h-69-3-230-106.chcgilgm.covad.net (diff)
Search:
Published under a Creative Commons License