My build and questions

More
05 Jun 2014 04:52 #47691 by andypugh
Replied by andypugh on topic My build and questions

Looks like my breakout board doesn't even do PWM which it looks like the mesa board would need to recieve.


That's OK, the breakout doesn't do PWM, LinuxCNC does PWM:
www.linuxcnc.org/docs/html/man/man9/pwmgen.9.html

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

More
05 Jun 2014 15:52 #47710 by yoshimitsuspeed
I knew there were PWM settings in the setup but I was afraid the board wouldn't be capable of speaking the language so to speak.
I did figure out the VFD should take PWM.

Does this mean that I should be able to set it up so that Linuxcnc can use one of the extra outputs on the breakout board to send the PWM signal to the VFD?
If so is it as simple as hooking up the VFD properly then telling linuxcnc which pin to send the signal to?

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

More
05 Jun 2014 17:05 #47712 by andypugh
Replied by andypugh on topic My build and questions

I did figure out the VFD should take PWM.

I got as far as working out that the drive _outputs_ PWM, but I didn't see anything in the manual tht indicated that it was happy with PWm on the input.
In practice the drive might well have an input filter which means that PWM is OK, but it would be good to be sure.

Does this mean that I should be able to set it up so that Linuxcnc can use one of the extra outputs on the breakout board to send the PWM signal to the VFD?
If so is it as simple as hooking up the VFD properly then telling linuxcnc which pin to send the signal to?


Yes. In fact Stepconf allows you to allocate a pin to "Spindle PWM" and does all the work for you. I can't recall if you are still using Stepconf or have moved on to hand-editing.

If you have any electronic components you can try making a filter to create a variable voltage for the VFD. Just connect a 5k resistor to the output terminal on the BoB, then a capacitor (about 1uF) from the other side of the resistor to a GND terminal and you should be able to measure a 0-5V voltage that varies with PWM duty cycle.
Depending on the nature of the BoB outputs you might find that you can increase the voltage, but that it never decreases.

To use this simple filter you need to connect the BoB 0V/GND to the "Common" terminal in the VFD, and you might actually prefer not to do this, for noise reasons. (Some DC motor controllers have the low-side of the pot floating at 100V relative to gnd, and connecting _that_ to the BoB is rapidly expensive. A VFD is probably better behaved)

To avoid both problems you can use a second opto-coupler than is driven on one side by the BoB, but on the output side you connect to the VFD +10V, 0V and control input. A totem-pole output opto works best, as they actively drain the cap as well as charge it, making for much better response and linearity. You would want a bigger resistor or cap for a parallel port PWM, I was using a mesa card with fast PWM when I was using that circuit.


Attachments:

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

More
06 Jun 2014 06:08 - 06 Jun 2014 06:40 #47735 by yoshimitsuspeed
Thanks I'll look into that more when I have time.
I'm still getting the occasional crash but I don't really know what I am looking for in the logs. Something about the RTAI I guess?
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.4
Machine configuration directory is '/home/yoshi/linuxcnc/configs/XYZ'
Machine configuration file is 'XYZ.ini'
INIFILE=/home/yoshi/linuxcnc/configs/XYZ/XYZ.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2373
Killing task milltask, PID=2424
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1 
Can not find -sec IO -var IO -num 1 
Can not find -sec LINUXCNC -var NML_FILE -num 1 
Can not find -sec EMC -var NML_FILE -num 1 
/usr/bin/linuxcnc: line 692:  2425 Segmentation fault      $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
2373
  PID TTY      STAT   TIME COMMAND
2424
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[12099.552747] I-pipe: Domain RTAI registered.
[12099.552761] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[12099.552767] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[12099.552871] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[12099.552877] PIPELINE layers:
[12099.552887] fb731e20 9ac15d93 RTAI 200
[12099.552892] c085cb20 0 Linux 100
[12099.582674] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[12099.582997] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[12099.583005] RTAI[sched]: hard timer type/freq = APIC/12500378(Hz); default timing: periodic; linear timed lists.
[12099.583011] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3000232000 hz.
[12099.583014] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[12099.583135] RTAI[usi]: enabled.
[12099.662720] RTAI[math]: loaded.
[12099.749405] config string '0x378 out  '
[12786.855627] hub 1-8:1.0: port 1 disabled by hub (EMI?), re-enabling...
[12786.856004] usb 1-8.1: USB disconnect, address 11
[12787.088663] usb 1-8.1: new low speed USB device using ehci_hcd and address 15
[12787.184444] usb 1-8.1: configuration #1 chosen from 1 choice
[12787.188885] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:13.5/usb1/1-8/1-8.1/1-8.1:1.0/input/input12
[12787.189572] generic-usb 0003:0000:0538.0009: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:13.5-8.1/input0
[12787.879725] hub 1-8:1.0: port 1 disabled by hub (EMI?), re-enabling...
[12787.880091] usb 1-8.1: USB disconnect, address 15
[12788.116767] usb 1-8.1: new low speed USB device using ehci_hcd and address 16
[12788.212466] usb 1-8.1: configuration #1 chosen from 1 choice
[12788.216731] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:13.5/usb1/1-8/1-8.1/1-8.1:1.0/input/input13
[12788.216997] generic-usb 0003:0000:0538.000A: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:13.5-8.1/input0
[12794.792347] hub 1-8:1.0: port 1 disabled by hub (EMI?), re-enabling...
[12794.792719] usb 1-8.1: USB disconnect, address 16
[12795.032674] usb 1-8.1: new low speed USB device using ehci_hcd and address 17
[12795.128400] usb 1-8.1: configuration #1 chosen from 1 choice
[12795.132834] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:13.5/usb1/1-8/1-8.1/1-8.1:1.0/input/input14
[12795.133235] generic-usb 0003:0000:0538.000B: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:13.5-8.1/input0
[12795.560678] hub 1-8:1.0: port 1 disabled by hub (EMI?), re-enabling...
[12795.561062] usb 1-8.1: USB disconnect, address 17
[12795.804733] usb 1-8.1: new low speed USB device using ehci_hcd and address 18
[12795.900460] usb 1-8.1: configuration #1 chosen from 1 choice
[12795.903333] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:13.5/usb1/1-8/1-8.1/1-8.1:1.0/input/input15
[12795.903709] generic-usb 0003:0000:0538.000C: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:13.5-8.1/input0
[14917.016378] usb 1-7: new high speed USB device using ehci_hcd and address 19
[14917.154044] usb 1-7: configuration #1 chosen from 1 choice
[14917.155044] scsi11 : SCSI emulation for USB Mass Storage devices
[14917.155237] usb-storage: device found at 19
[14917.155242] usb-storage: waiting for device to settle before scanning
[14922.152241] usb-storage: device scan complete
[14922.244725] scsi 11:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PQ: 0 ANSI: 0 CCS
[14922.245627] sd 11:0:0:0: Attached scsi generic sg2 type 0
[14922.798867] sd 11:0:0:0: [sdb] 15124992 512-byte logical blocks: (7.74 GB/7.21 GiB)
[14922.799356] sd 11:0:0:0: [sdb] Write Protect is off
[14922.799361] sd 11:0:0:0: [sdb] Mode Sense: 23 00 00 00
[14922.799365] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[14922.803003] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[14922.803014]  sdb: sdb1
[14922.819574] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[14922.819586] sd 11:0:0:0: [sdb] Attached SCSI removable disk
[14940.708452] axis[2425]: segfault at 0 ip (null) sp bf97767c error 4 in libcrypto.so.0.9.8[110000+138000]
[14943.367032] RTAI[math]: unloaded.
[14943.411320] SCHED releases registered named ALIEN RTGLBH
[14943.440642] RTAI[malloc]: unloaded.
[14943.540268] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[14943.544650] I-pipe: Domain RTAI unregistered.
[14943.544730] RTAI[hal]: unmounted.
Last edit: 06 Jun 2014 06:40 by BigJohnT. Reason: add code tags

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

More
08 Jun 2014 00:45 #47777 by yoshimitsuspeed
No more ideas? It really sucks when this thing crashes and I need to rehome and re touch off the whole machine.

Can anyone at least tell me what to get out of this message?
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2373
Killing task milltask, PID=2424
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done
I don't believe there is anything terribly valuable here is there?

Debug file information:
Can not find -sec MOT -var MOT -num 1 
Can not find -sec IO -var IO -num 1 
Can not find -sec LINUXCNC -var NML_FILE -num 1 
Can not find -sec EMC -var NML_FILE -num 1 
/usr/bin/linuxcnc: line 692:  2425 Segmentation fault      $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
2373
  PID TTY      STAT   TIME COMMAND
2424
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components

Seems like this is the important bit but I don't really get what the problem is. I searched for some of the errors but couldn't find anything.
Why can't it find these things? It seems like more of a software issue than a hardware issue if it's the above. If so what would cause it and or what would fix it?

Is there anything important in the rest of the code?

This problem is very intermittent. It can happen twice in an hour or it can run for 6 hours without fail.

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

More
08 Jun 2014 01:34 #47778 by andypugh
Replied by andypugh on topic My build and questions

/usr/bin/linuxcnc: line 692: 2425 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS


It looks like it might be graphics related.

If you change the INI file [DISPLAY] section so that the DISPLAY entry says tklinuxcnc does it work better?

The OpenGL graphical preview sometimes causes problems.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Troubl...oting#Display_Issues

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

More
08 Jun 2014 01:42 #47779 by PCW
Replied by PCW on topic My build and questions
also the kernel log (dmesg) may have some more detailed information

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

More
14 Jun 2014 15:33 - 14 Jun 2014 15:37 #47963 by yoshimitsuspeed
I was hoping to have found a solution to the crashing before posting back but I have not. A couple times it seemed fine for a day or two and I thought it was resolved then another time it would crash three times in an hour. Oftentimes restarting the computer seems to help. Twice I have also lost all USB inputs making my mouse and keyboard useless. Not something you want when then CNC is running. A reboot is the only thing I have found to fix it. I am using an old hand me down computer that had a busted power supply. I got it running again but it may have had other bugs I wasn't aware of. As soon as my PCIE com port shows up I will be trying another computer.


I am hoping you guys might be able to give me some advice on my stepper motors.
I would like to speed the machine up without changing ballscrews. Right now I am using 5mm pitch ballscrews. I can get 1080mm/s with as far as I can tell zero missed steps. As soon as I go over 1200 the motors freak out. I assume it's just missing steps but they will literally act like they are stripping out or the shaft is slipping or something but it's not. I am not at the limits of torque. At 1080 I cannot stop the spindle when it's moving yet speed it up just a little more and it freaks out. I would love to get this moving faster if possible. More important reliably and safely.

I tried changing some things hoping it would help. I started out with my drivers set to 2.4 amps so I tried clicking them up to the 3 amp max. This had no effect at all. I also tried changing the steps from 1/8 to 1/4 then to 1/2 and this also had no effect.
The power supply that came with the motors is only 10 amps which has me wondering, do stepper motors pull full current all the time? In which case the power supply is surely limiting the setup. Or does the stepper draw increase with load? In which case I doubt this is the problem because the problem is the same no matter how many motors are moving.
I can have one with no load slip as 1200 but I can run all four with two or three at a time under a good bit of load.

I'm actually looking at the wiring diagram and spec sheet right now.
I am pretty sure I wired it in series at the advice of someone on the IRC but I must have missed the part in the specs about amps because they show only 1.4 amp in series so if it is wired series it looks like I am overpowering it as is. .
Should I try wiring it in parallel if it isn't already?
I have read places that the motors will run hotter. Is there any reliability or long term concern with parallel?
www.kelinginc.net/KL23H286-20-8B.pdf
Last edit: 14 Jun 2014 15:37 by yoshimitsuspeed.

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

More
15 Jun 2014 05:10 #47975 by yoshimitsuspeed
So I switched to parallel and about doubled my speed. It looks like I can safely do about 2000 mm/min.
I was able to push it a lot faster until the machine got a little vibration or harmonic hum and that locks them up pretty quick. If I can get the machine tighter I might be able to run more.
I think that will take at the least a rev2 with some longer rails and the blocks spaced further apart. May even require moving away from the cheap Chinese linear motion. Neither is going to happen for a while but I think I can live with 2000 mm/min for the time being. I'll update when I start pushing the speed while cutting. The crazy thing is that when it's running smooth I still cannot stop the machine when I manually resist it as hard as possible so it still seems to have a decent bit of torque but as soon as it gets a little harmonic it kills it.
I should have paid more attention to the amps. My motors were getting very hot. One knowledgeable member on the IRQ said the temps I was seeing were acceptable and it doesn't appear as though I did any damage but they are cool to the touch now that I am running them in spec.

On a similar topic the stepper couplers that came with the machine were the flexible spiral type.
www.homanndesigns.com/store/images/Flexi...20Coupler_0_25x3.jpg

I broke two mostly due to bad alignment but it scared me enough to want to find an alternative.
I decided to try out the rubber type. I was thinking these may have more play but thinking about how the coiled aluminum could actually twist I'm thinking maybe not.
I would love anyones input on these. We used to use them on some of our equipment at my last job but not in high precision machines.
i.ebayimg.com/00/s/MTIwMFgxNjAw/z/QWIAAMXQVERStqzn/$_57.JPG
Although these may have a little more play it also seems like they may help insulate the motors from the harmonics as well.

I would love to go solid metal but I would need to get my tolerances tighter first. I have found very few available in this size in a solid type.

I would love any input on optimizing my motion control if anyone has any suggestions.

One interesting thing I noticed today was that more voltage or more amps did not seem to do much.
Those power supplies have a voltage adjustment screw. I turned it from 36v to 40v and didn't notice much change in max speed without skipping.
On my drivers once I moved to parallel where it was speced for higher amperage I played with w wide range of amps.
On my y axis running two motors I really couldn't see any change from 1.8 amps to 3 amps. It would start skipping at about the same RPM.

My Y axis seemed to like anything in the 1.8-2.4 amp range more than anything else.

The Z seemed the most particular and I actually found I could push it much faster at 1.8 amps than I could at anything higher or lower.

If anyone has any knowledge or input on that I'd love to hear it.

I would also love any resources that go into more detail on this. I have read more voltage should produce more torque and some other generalizations that go against my experience. I would really like to understand the details more so I know the effects of changes and how to best optimize my setup.

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

More
15 Jun 2014 05:16 #47976 by yoshimitsuspeed
Here is some cool information I found.
s3.amazonaws.com/2012_pdfs/Electrocraft/...stems-2012-02-09.pdf

It shows minimal increase in torque from increased amperage especially in the upper RPM but it does show a significant increase in torque with increase in voltage. Maybe the difference from 36 to 40 that is within my range of adjustability just isn't enough to make a notable improvement?

Or perhaps as I have been wondering maybe it's something else causing the skipping especially since it's most notable when it gets a little harmonic. The motors feel like they are able to push extremely hard still but a little vibration and they are way more likely to skip.

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

Time to create page: 0.107 seconds
Powered by Kunena Forum