Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-12 Thread Willy Snow
When you use the word beginner I'd say forget all the experimental stuff
and just get a desktop PC. I just purchased this setup and the latency
is really great, usually < 9000 with an occasional 13300.

 http://www.newegg.com/Product/Product.aspx?Item...28860&Tpk=13-128-860
;
 http://www.newegg.com/Product/Product.aspx?Item...17545&Tpk=19-117-545
;
 http://www.newegg.com/Product/Product.aspx?Item...31718&Tpk=20-231-718
;
 http://www.newegg.com/Product/Product.aspx?Item...36339&Tpk=22-236-339
;

JT


After spending a day or two dicking around on two old computers, I bought
this system. It worked great!

Also got:

http://www.newegg.com/Product/Product.aspx?Item=N82E16817182328
http://www.newegg.com/Product/Product.aspx?Item=N82E16815124083

This gave me a complete system in an old box. Thanks JT!

Personally, I would go with a BBB and machinekit for a 3D printer. This is
really based on size, but you don't need as much functionality with a 3D
printer.

These are good motors for a 3D printer. They have very similar specs to the
Ultimaker motors. I am just using them for testing as of now, but they will
eventually go into a Ultimaker clone, only different.

https://ultimachine.com/content/kysan-1124090-nema-17-stepper-motor
http://www.kysanelectronics.com/graphics/1124090-8.3.15.pdf

U possibly can use Cura for the gcode?

Bill
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-12 Thread Mark Wendt
On Sun, Oct 11, 2015 at 7:31 PM, Willy Snow  wrote:
> Well spotted!
>
> Bill, you need to either un-select "simulator" in stepconf, or swap
> "sim_parport" for "hal_parport" in your hal.
>
>
> Doh!
>
> Got it running. Thanks everyone!
>
> https://www.youtube.com/watch?v=BlfAynGyWaU&feature=youtu.be
>
> Bill

The shop dog seems to be ignoring the excitement.  ;-)

Mark

-- 
One Man, One Machine, One Computer!  

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread Willy Snow
Well spotted!

Bill, you need to either un-select "simulator" in stepconf, or swap
"sim_parport" for "hal_parport" in your hal.


Doh!

Got it running. Thanks everyone!

https://www.youtube.com/watch?v=BlfAynGyWaU&feature=youtu.be

Bill

>
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread andy pugh
On 11 October 2015 at 22:39, Chris Morley  wrote:

> You have SIM config checked on the first page?

Well spotted!

Bill, you need to either un-select "simulator" in stepconf, or swap
"sim_parport" for "hal_parport" in your hal.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread Chris Morley

You have SIM config checked on the first page?

- Reply message -
From: "andy pugh" 
To: "Enhanced Machine Controller (EMC)" 
Subject: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port
Date: Sun, Oct 11, 2015 2:04 PM


On 11 October 2015 at 20:56, Willy Snow  wrote:
> loadrt hal_parport cfg="0e010" [**tried adding here and other places
> but only get errors]

What errors?

--
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread andy pugh
On 11 October 2015 at 20:56, Willy Snow  wrote:
> loadrt hal_parport cfg="0e010"

Should be "0xE010"

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread andy pugh
On 11 October 2015 at 20:56, Willy Snow  wrote:
> loadrt hal_parport cfg="0e010" [**tried adding here and other places
> but only get errors]

What errors?

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread Willy Snow
>Is there a reason not to use the HAL file created by Stepconf?

>> I assume I need to add "loadrt hal_parport cfg="0e010" to my hal file. Does
>> it matter where it goes?

>It has to go near the top, before any HAL lines that try to addf the
>threads and net the pins.

I start with my hal file from Stepconf. This is called
Gecko_540B4_TEST.hal I get errors when I try to add the line above.

It does work in the hal file from
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester

I can talk to each pin. This is what that modified hal file looks like.

ptest.hal
loadrt hal_parport cfg="0e010"
loadusr -Wn PortTest pyvcp -c PortTest ptest.xml
loadrt threads name1=porttest period1=100
addf parport.0.read porttest
addf parport.0.write porttest

It also works perfectly fine when I test it in Stepconf wizard. I
would assume something does not get carried over correctly to the hal.

Gecko_540B4_TEST.hal
# Generated by stepconf 1.1 at Sun Oct 11 09:36:52 2015
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt sim_parport names=parport.0
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out

loadrt hal_parport cfg="0e010" [**tried adding here and other places
but only get errors]
addf parport.0.read base-thread
source sim_hardware.hal
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

Bill


 
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread andy pugh
On 11 October 2015 at 18:38, Willy Snow  wrote:

> So it works fine in Stepconf Wizard, but not in LCNC.

Is there a reason not to use the HAL file created by Stepconf?

> I assume I need to add "loadrt hal_parport cfg="0e010" to my hal file. Does
> it matter where it goes?

It has to go near the top, before any HAL lines that try to addf the
threads and net the pins.

To be honest, I would start with the stepconf configuration, and add
your own stuff to that.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread Willy Snow
>
> It's a bit strange that it moved, the earlier lspci -vv had it at
> 0xd010. Have you changed PCI slots?
>
> --
> atp
> If you can't fix it, you don't own it.
> http://www.ifixit.com/Manifesto


Hi Andy,

I swapped it out while troubleshooting.

So it works fine in Stepconf Wizard, but not in LCNC.

I assume I need to add "loadrt hal_parport cfg="0e010" to my hal file. Does
it matter where it goes?

Bill
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-11 Thread andy pugh
On 11 October 2015 at 06:23, Willy Snow  wrote:
> I do lspci -vvv and search for 9900 device. Then I use the first I/O port.
> >From below the I/O is e010 so my port is 0e010. Worked great!!

It's a bit strange that it moved, the earlier lspci -vv had it at
0xd010. Have you changed PCI slots?

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread Willy Snow
Got it!!! With a little help from a friend.

He figured out 0x378 is for a on-board parallel port. Mine is a add on.

I do lspci -vvv and search for 9900 device. Then I use the first I/O port.
>From below the I/O is e010 so my port is 0e010. Worked great!!



bill@CNC:~/Desktop$ lspci -vvv
01:00.0 Parallel controller: NetMos Technology Device 9900 (prog-if 03
[IEEE1284])
Subsystem: Device a000:2000
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 

Thanks for the help!

Bill
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread andy pugh
On 11 October 2015 at 01:40, Willy Snow  wrote:
> Linux ports 0 and 1 did not work. 0x378 seemed to load (it did not give
> error message). I still cannot make the motor turn if I set Parport Base
> Address to 0x378 in Stepconf Wizard.

Caveat: I haven't even tried to use a parport for about 5 years...

I don't think that you can read too much into 0x378 not erroring, I
get no error with an explicit address on my VM which I know has no
parport.

You might find this useful:
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester

You need to alter the HAL file to change the base address, but at
least you can test with a voltmeter on the actual pins, or short an
input to a gnd pin to see the on-screen "led" change state.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread Willy Snow
Hi Andy,

I fixed the typos.

Linux ports 0 and 1 did not work. 0x378 seemed to load (it did not give
error message). I still cannot make the motor turn if I set Parport Base
Address to 0x378 in Stepconf Wizard.


halcmd: loadrt hal_parport cfg="0"
Error: could not insert module
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such
device
:3: exit value: 1
:3: insmod for hal_parport failed, returned -1
See the output of 'dmesg' for more information.

halcmd: loadrt hal_parport cfg="1"
Error: could not insert module
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such
device
:4: exit value: 1
:4: insmod for hal_parport failed, returned -1
See the output of 'dmesg' for more information.

halcmd: loadrt hal_parport cfg="0x378"

bill@CNC:~$ dmesg
[  344.629510] config string '0'
[  344.630112] PARPORT: ERROR: linux parport 0 not found
[  350.869180] config string '1'
[  350.869752] PARPORT: ERROR: linux parport 1 not found
[  376.501674] config string '0x378'
[  473.293668] RTAI[math]: unloaded.
[  473.294579] SCHED releases registered named ALIEN PEDV$D
[  473.30] RTAI[malloc]: unloaded.
[  473.396940] RTAI[sched]: unloaded (forced hard/soft/hard transitions:
traps 0, syscalls 0).
[  473.397846] I-pipe: head domain RTAI unregistered.
[  473.397880] RTAI[hal]: unmounted.
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread andy pugh
On 10 October 2015 at 16:59, Willy Snow  wrote:
> bill@CNC:~/Desktop$ halrun
> halcmd: loadrt hal_parport cfg-"0"

> [  141.692879] hal_parport: Unknown parameter `cfg-"0"

That could just be a typo. you have cfg- not cfg=

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread Willy Snow
Hi Andy,

Here is the hal load for port 0 and 1. They both don't load. I would assume
I am connected to linux "0" since they have different errors.

FYI: Last night I swapped card ports to see if this was this issue.

bill@CNC:~/Desktop$ halrun
halcmd: loadrt hal_parport cfg-"0"
Error: could not insert module
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Unknown
symbol in module
:1: exit value: 1
:1: insmod for hal_parport failed, returned -1
See the output of 'dmesg' for more information.

dmesg (searched for "parport")
[  141.692879] hal_parport: Unknown parameter `cfg-"0"


bill@CNC:~/Desktop$ halrun
halcmd: loadrt hal_parport cfg="1"
Error: could not insert module
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such
device
:1: exit value: 1
:1: insmod for hal_parport failed, returned -1
See the output of 'dmesg' for more information.

dmesg (searched for "parport")
[  141.692879] hal_parport: Unknown parameter `cfg-"0"'
[  514.660394] PARPORT: ERROR: linux parport 1 not found
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-10 Thread andy pugh
On 10 October 2015 at 01:55, Willy Snow  wrote:

>   d000-dfff : PCI Bus :04
> d000-d007 : :04:00.0
> d010-d017 : :04:00.0

This could be it, but I was hoping for something a little more unambiguous

>>Does the linuxCNC parport driver load?
> bill@CNC:~$ loadrt hal_parport cfg="0"
> bash: loadrt: command not found

"loadrt" is a HAL command, not a shell command.

halrun
loadrt hal_parport cfg="0"

is what you would need.
(probably followed by

exit
dmesg

if it fails to load. On my VM I got:
[1297675.876520] PARPORT: ERROR: linux parport 0 not found
in dmesg, but that was hardly a surprise)

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-09 Thread Willy Snow
Thanks Andy.

>You could try "cat /proc/ioports" though I suspect it will give the
same answer as you already have.

bill@CNC:~$ cat /proc/ioports
-0cf7 : PCI Bus :00
  -001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0064-0064 : keyboard
  0070-0077 : rtc0
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : fpu
  03c0-03df : vga+
  03f8-03ff : serial
  04d0-04d1 : pnp 00:0b
  0680-069f : pnp 00:06
  0a00-0a0f : pnp 00:09
  0a20-0a2f : pnp 00:09
  0a30-0a3f : pnp 00:09
0cf8-0cff : PCI conf1
0d00- : PCI Bus :00
  164e-164f : pnp 00:06
  1800-18fe : pnp 00:06
1800-1803 : ACPI PM1a_EVT_BLK
1804-1805 : ACPI PM1a_CNT_BLK
1808-180b : ACPI PM_TMR
1820-182f : ACPI GPE0_BLK
1850-1850 : ACPI PM2_CNT_BLK
1854-1857 : pnp 00:08
  1c00-1cfe : pnp 00:06
  1d00-1dfe : pnp 00:06
  1e00-1efe : pnp 00:06
  1f00-1ffe : pnp 00:06
  d000-dfff : PCI Bus :04
d000-d007 : :04:00.0
d010-d017 : :04:00.0
  e000-efff : PCI Bus :02
e000-e0ff : :02:00.0
  e000-e0ff : r8169
  f000-f03f : :00:02.0
  f040-f05f : :00:1f.3
  f060-f07f : :00:1f.2
f060-f07f : ahci
  f080-f083 : :00:1f.2
f080-f083 : ahci
  f090-f097 : :00:1f.2
f090-f097 : ahci
  f0a0-f0a3 : :00:1f.2
f0a0-f0a3 : ahci
  f0b0-f0b7 : :00:1f.2
f0b0-f0b7 : ahci
  - : pnp 00:06
- : pnp 00:06
  - : pnp 00:06



>Does the linuxCNC parport driver load?

bill@CNC:~$ loadrt hal_parport cfg="0"
bash: loadrt: command not found



>Does lsmod show "lp" ? That might suggest that something has grabbed your port.

It does sho lp.


bill@CNC:~$ lsmod
Module  Size  Used by
parport_pc 21896  0
ppdev  12591  0
lp 12767  0
parport35208  3 lp,ppdev,parport_pc
bnep   17186  2
rfcomm 36117  0
bluetooth 166348  10 bnep,rfcomm
rfkill 18403  2 bluetooth
uinput 17057  1
nfsd  202675  2
nfs   277039  0
nfs_acl12464  2 nfs,nfsd
auth_rpcgss32226  2 nfs,nfsd
fscache35490  1 nfs
lockd  56898  2 nfs,nfsd
sunrpc151263  6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
loop   21832  0
snd_hda_codec_realtek53766  1
snd_hda_intel  25789  1
snd_hda_codec  79439  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep  12911  1 snd_hda_codec
snd_pcm69181  2 snd_hda_codec,snd_hda_intel
snd_page_alloc 12842  2 snd_pcm,snd_hda_intel
snd_seq43338  0
snd_seq_device 12981  1 snd_seq
iTCO_wdt   16918  0
snd_timer  22188  2 snd_pcm,snd_seq
snd46731  10
snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_device
evdev  17099  14
psmouse67176  0
video  17461  0
serio_raw  12734  0
iTCO_vendor_support12586  1 iTCO_wdt
button 12818  0
coretemp   12771  0
i2c_i801   16788  0
i2c_core   23097  1 i2c_i801
soundcore  12891  1 snd
crc32c_intel   12625  0
ext4  270189  1
crc16  12328  2 ext4,bluetooth
jbd2   54294  1 ext4
mbcache12899  1 ext4
usbhid 39608  0
hid72252  1 usbhid
sg 25482  0
sd_mod 43403  3
crc_t10dif 12333  1 sd_mod
fan12595  0
thermal_sys17699  2 fan,video
microcode  17386  0
r8169  49478  0
mii12596  1 r8169
ahci   24918  2
libahci22312  1 ahci
libata152992  2 ahci,libahci
ehci_hcd   43561  0
scsi_mod  125436  3 sg,libata,sd_mod
xhci_hcd   80023  0
usbcore   124257  4 ehci_hcd,usbhid,xhci_hcd
usb_common 12339  1 usbcore

Sorry if I give too much info. It is still pretty foreign to me.
--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem Connecting LCNC to G540 from PCIE Port

2015-10-09 Thread andy pugh
On 9 October 2015 at 19:54, Willy Snow  wrote:
> *lspci -vvv*
>
> 04:00.0 Parallel controller: NetMos Technology Device 9900 (prog-if 03
> [IEEE1284])
> Subsystem: Device a000:2000
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-  SERR-  Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 11
> Region 0: I/O ports at d010 [size=8]
> Region 1: I/O ports at d000 [size=8]


You could try "cat /proc/ioports" though I suspect it will give the
same answer as you already have.

Does the linuxCNC parport driver load?

Does lsmod show "lp" ? That might suggest that something has grabbed your port.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users