controlling coolant w/serial port

More
19 Jul 2009 19:41 #581 by mozmck
Hmm, the forum software didn't like my python scipt as an attachment. Here is it as text. Just save it as "serial-relays.py" and make it executable.
#!/usr/bin/python
import hal, time, serial

h = hal.component("serial-relays")
h.newpin("relay1A", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1B", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1C", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1D", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1E", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1F", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1G", hal.HAL_BIT, hal.HAL_IN)
h.newpin("relay1H", hal.HAL_BIT, hal.HAL_IN)
h.ready()

# Serial stuff, change the serial port address by changing /dev/ttyS0
ser = serial.Serial('/dev/ttyS0', 2400, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=0, rtscts=0)

rA = 0
rB = 0
rC = 0
rD = 0
rE = 0
rF = 0
rG = 0
rH = 0

# Function to send data.  Uncomment the time.sleep(...) functions if you need more delay between characters.
# The value in the time.sleep(...) functions is in seconds and can be changed as needed.
def serial_command(r, cmd):
    while ser.inWaiting():
        pass
    ser.write('R')
#    time.sleep(0.01)
    ser.write('M')
#    time.sleep(0.01)
    ser.write('1')
#    time.sleep(0.01)
    ser.write(r)
#    time.sleep(0.01)
    if True == cmd:
        ser.write('1')
    else:
        ser.write('0')


try:
    #Main Loop
    while 1:
        if (rA != h.relay1A):
            rA = h.relay1A
            serial_command('A', rA)
        if (rB != h.relay1B):
            rB = h.relay1B
            serial_command('B', rB)
        if (rC != h.relay1C):
            rC = h.relay1C
            serial_command('C', rC)
        if (rD != h.relay1D):
            rD = h.relay1D
            serial_command('D', rD)
        if (rD != h.relay1D):
            rD = h.relay1D
            serial_command('D', rD)
        if (rE != h.relay1E):
            rE = h.relay1E
            serial_command('E', rE)
        if (rF != h.relay1F):
            rF = h.relay1F
            serial_command('F', rF)
        if (rG != h.relay1G):
            rG = h.relay1G
            serial_command('G', rG)
        if (rH != h.relay1H):
            rH = h.relay1H
            serial_command('H', rH)
        

except KeyboardInterrupt:
    raise SystemExit

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

More
19 Jul 2009 23:06 #583 by jerrybaca
that looks like exactly what i need i think i don't know where to save the serial-relays.py file sa i get this error i think this is the important part


Debug file information:
custom.hal:3: execv(./serial-relays.py) failed
custom.hal:8: pin 'serial-relays.relay1A' does not exist
7372
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

but just in case here is the whole message

Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.24-16-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=emcsh
EMC2_IOSH=iosh
EMC2 - 2.3.0
Machine configuration directory is '/home/jerrybaca/emc2/configs/harborfrieghtmill'
Machine configuration file is 'harborfrieghtmill.ini'
INIFILE=/home/jerrybaca/emc2/configs/harborfrieghtmill/harborfrieghtmill.ini
PARAMETER_FILE=emc.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=halui
DISPLAY=axis
NML_FILE=emc.nml
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting EMC2 IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=7372
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Kernel message information:
[ 0.000000] Linux version 2.6.24-16-rtai (root@hardy) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 Tue Sep 30 22:54:33 EEST 2008 (Ubuntu 2.6.24-12.22-generic)
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
[ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000001bf70000 (usable)
[ 0.000000] BIOS-e820: 000000001bf70000 - 000000001bf7f000 (ACPI data)
[ 0.000000] BIOS-e820: 000000001bf7f000 - 000000001bf80000 (ACPI NVS)
[ 0.000000] BIOS-e820: 000000001bf80000 - 000000001c000000 (reserved)
[ 0.000000] BIOS-e820: 000000002bf80000 - 000000002c000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
[ 0.000000] 0MB HIGHMEM available.
[ 0.000000] 447MB LOWMEM available.
[ 0.000000] Entering add_active_range(0, 0, 114544) 0 entries of 256 used
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0 -> 4096
[ 0.000000] Normal 4096 -> 114544
[ 0.000000] HighMem 114544 -> 114544
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0 -> 114544
[ 0.000000] On node 0 totalpages: 114544
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 4064 pages, LIFO batch:0
[ 0.000000] Normal zone: 862 pages used for memmap
[ 0.000000] Normal zone: 109586 pages, LIFO batch:31
[ 0.000000] HighMem zone: 0 pages used for memmap
[ 0.000000] Movable zone: 0 pages used for memmap
[ 0.000000] DMI 2.3 present.
[ 0.000000] Allocating PCI resources starting at 30000000 (gap: 2c000000:d3f80000)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 113650
[ 0.000000] Kernel command line: root=UUID=0000605B0000042C loop=/ubuntu/disks/root.disk ro quiet splash
[ 0.000000] Enabling fast FPU save and restore... done.
[ 0.000000] Enabling unmasked SIMD FPU exception support... done.
[ 0.000000] Initializing CPU#0
[ 0.000000] PID hash table entries: 2048 (order: 11, 8192 bytes)
[ 0.000000] Detected 1594.945 MHz processor.
[ 22.048879] I-pipe 2.0-04: pipeline enabled.
[ 22.050529] Console: colour VGA+ 80x25
[ 22.050536] console [tty0] enabled
[ 22.050971] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 22.051599] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 22.068457] Memory: 444016k/458176k available (1440k kernel code, 13544k reserved, 573k data, 228k init, 0k highmem)
[ 22.068473] virtual kernel memory layout:
[ 22.068477] fixmap : 0xfffed000 - 0xfffff000 ( 72 kB)
[ 22.068479] pkmap : 0xff800000 - 0xffc00000 (4096 kB)
[ 22.068481] vmalloc : 0xdc800000 - 0xff7fe000 ( 559 MB)
[ 22.068483] lowmem : 0xc0000000 - 0xdbf70000 ( 447 MB)
[ 22.068484] .init : 0xc02fa000 - 0xc0333000 ( 228 kB)
[ 22.068486] .data : 0xc026836d - 0xc02f77ec ( 573 kB)
[ 22.068488] .text : 0xc0100000 - 0xc026836d (1440 kB)
[ 22.068495] Checking if this processor honours the WP bit even in supervisor mode... Ok.
[ 22.068563] SLUB: Genslabs=11, HWalign=64, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
[ 22.148594] Calibrating delay using timer specific routine.. 3191.80 BogoMIPS (lpj=6383605)
[ 22.148637] Security Framework initialized
[ 22.148643] SELinux: Disabled at boot.
[ 22.148668] AppArmor: AppArmor initialized
[ 22.148679] Failure registering capabilities with primary security module.
[ 22.148690] Mount-cache hash table entries: 512
[ 22.148881] CPU: After generic identify, caps: bfebf9ff 00000000 00000000 00000000 00000400 00000000 00000000 00000000
[ 22.148898] CPU: Trace cache: 12K uops, L1 D cache: 8K
[ 22.148902] CPU: L2 cache: 256K
[ 22.148907] CPU: After all inits, caps: bfebf9ff 00000000 00000000 0000b080 00000400 00000000 00000000 00000000
[ 22.148920] Compat vDSO mapped to ffffe000.
[ 22.148939] CPU: Intel Mobile Intel(R) Celeron(R) CPU 1.60GHz stepping 07
[ 22.148954] Checking 'hlt' instruction... OK.
[ 22.164971] Freeing SMP alternatives: 0k freed
[ 22.165363] net_namespace: 64 bytes
[ 22.166273] NET: Registered protocol family 16
[ 22.166770] EISA bus registered
[ 22.167110] PCI: PCI BIOS revision 2.10 entry at 0xfd89b, last bus=2
[ 22.167116] PCI: Using configuration type 1
[ 22.167119] Setting up standard PCI resources
[ 22.169884] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 22.170451] PCI: Probing PCI hardware
[ 22.170486] PCI: Probing PCI hardware (bus 00)
[ 22.171005] PCI quirk: region 8000-803f claimed by ali7101 ACPI
[ 22.171011] PCI quirk: region 8040-805f claimed by ali7101 SMB
[ 22.172403] PCI: Using ALI IRQ Router
[ 22.172411] PCI: Using IRQ router ALI [10b9/1533] at 0000:00:07.0
[ 22.172436] PCI: setting IRQ 11 as level-triggered
[ 22.172441] PCI: Found IRQ 11 for device 0000:00:0a.0
[ 22.184814] AppArmor: AppArmor Filesystem Enabled
[ 22.185808] PCI: Bridge: 0000:00:01.0
[ 22.185815] IO window: 9000-9fff
[ 22.185821] MEM window: d0300000-d03fffff
[ 22.185826] PREFETCH window: d8000000-dfffffff
[ 22.185832] PCI: Bus 2, cardbus bridge: 0000:00:0a.0
[ 22.185835] IO window: 00001800-000018ff
[ 22.185840] IO window: 00001c00-00001cff
[ 22.185845] PREFETCH window: 30000000-33ffffff
[ 22.185850] MEM window: 34000000-37ffffff
[ 22.185879] PCI: Enabling device 0000:00:0a.0 (0000 -> 0003)
[ 22.185890] PCI: Found IRQ 11 for device 0000:00:0a.0
[ 22.185929] NET: Registered protocol family 2
[ 22.188605] Time: tsc clocksource has been installed.
[ 22.220719] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 22.221109] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 22.221270] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 22.221358] TCP: Hash tables configured (established 16384 bind 16384)
[ 22.221363] TCP reno registered
[ 22.232927] checking if image is initramfs... it is
[ 23.265939] Freeing initrd memory: 6851k freed
[ 23.266903] audit: initializing netlink socket (disabled)
[ 23.266937] audit(1248015976.200:1): initialized
[ 23.270639] VFS: Disk quotas dquot_6.5.1
[ 23.270699] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 23.270971] io scheduler noop registered
[ 23.270976] io scheduler anticipatory registered
[ 23.270979] io scheduler deadline registered
[ 23.271000] io scheduler cfq registered (default)
[ 23.488650] Activating ISA DMA hang workarounds.
[ 23.488672] Boot video device is 0000:01:05.0
[ 23.489203] isapnp: Scanning for PnP cards...
[ 23.843704] isapnp: No Plug & Play device found
[ 23.864676] Clocksource tsc unstable (delta = 200061355 ns)
[ 23.868663] Time: pit clocksource has been installed.
[ 23.946581] Real Time Clock Driver v1.12ac
[ 23.946590] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[ 23.946814] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 23.948365] PCI: Enabling device 0000:00:08.0 (0000 -> 0003)
[ 23.948385] PCI: setting IRQ 10 as level-triggered
[ 23.948389] PCI: Assigned IRQ 10 for device 0000:00:08.0
[ 23.950152] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[ 23.950351] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 23.950705] PNP: No PS/2 controller found. Probing ports directly.
[ 23.953243] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 23.953253] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 23.960911] mice: PS/2 mouse device common for all mice
[ 23.961233] EISA: Probing bus 0 at eisa.0
[ 23.961248] Cannot allocate resource for EISA slot 1
[ 23.961252] Cannot allocate resource for EISA slot 2
[ 23.961281] Cannot allocate resource for EISA slot 8
[ 23.961285] EISA: Detected 0 cards.
[ 23.961463] NET: Registered protocol family 1
[ 23.961491] Using IPI Shortcut mode
[ 23.961667] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 23.961671] EDD information not available.
[ 23.961976] Freeing unused kernel memory: 228k freed
[ 24.000733] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 25.579487] fuse init (API version 7.9)
[ 26.194874] usbcore: registered new interface driver usbfs
[ 26.194929] usbcore: registered new interface driver hub
[ 26.220879] usbcore: registered new device driver usb
[ 26.222584] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
[ 26.222663] PCI: Assigned IRQ 10 for device 0000:00:02.0
[ 26.222711] ohci_hcd 0000:00:02.0: OHCI Host Controller
[ 26.223370] ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
[ 26.223414] ohci_hcd 0000:00:02.0: irq 10, io mem 0xd0000000
[ 26.282999] usb usb1: configuration #1 chosen from 1 choice
[ 26.283047] hub 1-0:1.0: USB hub found
[ 26.283064] hub 1-0:1.0: 4 ports detected
[ 26.337231] SCSI subsystem initialized
[ 26.407286] natsemi dp8381x driver, version 2.1, Sept 11, 2006
[ 26.407291] originally by Donald Becker <This email address is being protected from spambots. You need JavaScript enabled to view it.>
[ 26.407294] 2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
[ 26.407379] PCI: Found IRQ 10 for device 0000:00:12.0
[ 26.409477] natsemi eth0: NatSemi DP8381[56] at 0xd0004000 (0000:00:12.0), 00:0b:cd:32:0b:2c, IRQ 10, port TP.
[ 26.425835] libata version 3.00 loaded.
[ 26.447423] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[ 26.447435] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[ 26.449060] ALI15X3: IDE controller (0x10b9:0x5229 rev 0xc4) at PCI slot 0000:00:10.0
[ 26.449101] ALI15X3: not 100% native mode: will probe irqs later
[ 26.449126] ide0: BM-DMA at 0x2000-0x2007, BIOS settings: hda:DMA, hdb:pio
[ 26.449151] ide1: BM-DMA at 0x2008-0x200f, BIOS settings: hdc:DMA, hdd:pio
[ 26.449170] Probing IDE interface ide0...
[ 27.409033] hda: HTS421212H9AT00, ATA DISK drive
[ 27.409112] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 27.409354] hda: UDMA/100 mode selected
[ 27.409626] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[ 27.409713] Probing IDE interface ide1...
[ 28.817003] hdc: Slimtype DVDRW SOSW-833S, ATAPI CD/DVD-ROM drive
[ 28.817073] hdc: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 28.817186] hdc: UDMA/33 mode selected
[ 28.817342] ide1 at 0x170-0x177,0x376 on irq 15
[ 28.831764] hda: max request size: 128KiB
[ 28.848078] hda: 234441648 sectors (120034 MB) w/7528KiB Cache, CHS=16383/255/63
[ 28.848818] hda: cache flushes supported
[ 28.848919] hda: hda1 hda2 hda3 < hda5 >
[ 28.913714] hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
[ 28.913729] Uniform CD-ROM driver Revision: 3.20
[ 30.379018] loop: module loaded
[ 30.443935] kjournald starting. Commit interval 5 seconds
[ 30.443973] EXT3-fs: mounted filesystem with ordered data mode.
[ 37.721311] Linux agpgart interface v0.102
[ 37.749280] agpgart: Detected Ati IGP330/340/345/350/M chipset
[ 37.929065] agpgart: AGP aperture is 64M @ 0xd4000000
[ 38.202140] Yenta: CardBus bridge found at 0000:00:0a.0 [103c:002a]
[ 38.202170] Yenta O2: res at 0x94/0xD4: 00/ea
[ 38.202174] Yenta O2: enabling read prefetch/write burst
[ 38.333852] Yenta: ISA IRQ mask 0x02b8, PCI irq 11
[ 38.333861] Socket status: 30000007
[ 38.351123] ali15x3_smbus 0000:00:11.0: ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr
[ 38.351138] ali15x3_smbus 0000:00:11.0: ALI15X3 not detected, module not inserted.
[ 38.730074] input: PC Speaker as /devices/platform/pcspkr/input/input2
[ 39.423920] Synaptics Touchpad, model: 1, fw: 5.8, id: 0x2348b3, caps: 0x904713/0x10008
[ 39.447858] PCI: Enabling device 0000:00:06.0 (0005 -> 0007)
[ 39.447876] PCI: setting IRQ 5 as level-triggered
[ 39.447881] PCI: Found IRQ 5 for device 0000:00:06.0
[ 39.484185] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input3
[ 41.929589] cs: IO port probe 0x100-0x3af: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x378-0x37f 0x388-0x38f
[ 41.931890] cs: IO port probe 0x3e0-0x4ff: excluding 0x408-0x40f 0x480-0x48f 0x4d0-0x4d7
[ 41.932839] cs: IO port probe 0x820-0x8ff: clean.
[ 41.933769] cs: IO port probe 0xc00-0xcf7: clean.
[ 41.934932] cs: IO port probe 0xa00-0xaff: clean.
[ 42.105148] ALSA /home/juve/hardy-packages/linux-git/ubuntu-hardy-lum/debian/build/build-rtai/sound/alsa-driver/pci/ac97/ac97_codec.c:2061: AC'97 1 does not respond - RESET
[ 42.121146] ALSA /home/juve/hardy-packages/linux-git/ubuntu-hardy-lum/debian/build/build-rtai/sound/alsa-driver/pci/ac97/ac97_codec.c:2070: AC'97 1 access is not valid [0xffffffff], removing mixer.
[ 42.121171] ALSA /home/juve/hardy-packages/linux-git/ubuntu-hardy-lum/debian/build/build-rtai/sound/alsa-driver/pci/ali5451/ali5451.c:1927: ali mixer 1 creating error.
[ 42.938064] lp: driver loaded but no devices found
[ 43.641939] EXT3 FS on loop0, internal journal
[ 71.719797] Adding 976552k swap on /host/ubuntu/disks/swap.disk. Priority:-1 extents:1 across:976552k
[ 72.805758] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 75.147792] ppdev: user-space parallel port driver
[ 75.406835] audit(1248037628.702:2): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=4084 profile="/usr/sbin/cupsd" namespace="default"
[ 76.934215] eth0: DSPCFG accepted after 0 usec.
[ 76.934231] eth0: link up.
[ 76.934244] eth0: Setting full-duplex based on negotiated link capability.
[ 77.342741] Bluetooth: Core ver 2.11
[ 77.347987] NET: Registered protocol family 31
[ 77.347998] Bluetooth: HCI device and connection manager initialized
[ 77.348005] Bluetooth: HCI socket layer initialized
[ 77.369959] Bluetooth: L2CAP ver 2.9
[ 77.369973] Bluetooth: L2CAP socket layer initialized
[ 77.462265] Bluetooth: RFCOMM socket layer initialized
[ 77.462355] Bluetooth: RFCOMM TTY layer initialized
[ 77.462359] Bluetooth: RFCOMM ver 1.8
[ 79.047100] [drm] Initialized drm 1.1.0 20060810
[ 79.102958] PCI: No IRQ known for interrupt pin A of device 0000:01:05.0. Please try using pci=biosirq.
[ 79.103328] [drm] Initialized radeon 1.28.0 20060524 on minor 0
[ 80.341285] NET: Registered protocol family 17
[ 80.704447] agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
[ 80.705892] agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
[ 80.707282] agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode
[ 82.046781] [drm] Setting GART location based on new memory map
[ 82.046849] [drm] writeback test succeeded in 1 usecs
[ 85.363033] NET: Registered protocol family 10
[ 85.364626] lo: Disabled Privacy Extensions
[ 95.598578] eth0: no IPv6 routers present
[ 337.760060] I-pipe: Domain RTAI registered.
[ 337.760083] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 337.760087] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 337.760099] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 337.760103] PIPELINE layers:
[ 337.760107] dcaf5000 9ac15d93 RTAI 200
[ 337.760111] c0383180 0 Linux 100
[ 337.844041] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 337.844619] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 337.844631] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 337.844637] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 337.844641] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 337.987820] RTAI[math]: loaded.
[ 338.040207] rtapi: no version for "nano2count" found: kernel tainted.
[ 338.318639] config string '0x378 out '
[ 1237.221541] nautilus[4739]: segfault at 00000032 eip b7afc87f esp bf8a3c30 error 4
[ 2324.444425] RTAI[math]: unloaded.
[ 2324.584517] SCHED releases registered named ALIEN RTGLBH
[ 2324.606161] RTAI[malloc]: unloaded.
[ 2324.704765] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2324.711081] I-pipe: Domain RTAI unregistered.
[ 2324.711098] RTAI[hal]: unmounted.
[ 2358.094947] I-pipe: Domain RTAI registered.
[ 2358.094968] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2358.094972] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2358.094982] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2358.094986] PIPELINE layers:
[ 2358.094990] dcaf5000 9ac15d93 RTAI 200
[ 2358.094994] c0383180 0 Linux 100
[ 2358.152677] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2358.153556] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2358.153568] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2358.153574] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 2358.153579] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2358.293302] RTAI[math]: loaded.
[ 2358.630005] config string '0x378 out '
[ 2360.286661] RTAI[math]: unloaded.
[ 2360.363031] SCHED releases registered named ALIEN RTGLBH
[ 2360.384292] RTAI[malloc]: unloaded.
[ 2360.483703] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2360.489974] I-pipe: Domain RTAI unregistered.
[ 2360.489991] RTAI[hal]: unmounted.
[ 2592.436754] I-pipe: Domain RTAI registered.
[ 2592.436776] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2592.436780] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2592.436792] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2592.436796] PIPELINE layers:
[ 2592.436801] dcaf5000 9ac15d93 RTAI 200
[ 2592.436805] c0383180 0 Linux 100
[ 2592.482844] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2592.487465] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2592.487479] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2592.487485] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 2592.487489] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2592.674806] RTAI[math]: loaded.
[ 2592.987564] config string '0x378 out '
[ 2594.739579] RTAI[math]: unloaded.
[ 2594.816700] SCHED releases registered named ALIEN RTGLBH
[ 2594.837422] RTAI[malloc]: unloaded.
[ 2594.936787] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2594.943104] I-pipe: Domain RTAI unregistered.
[ 2594.943121] RTAI[hal]: unmounted.
[ 2715.971459] I-pipe: Domain RTAI registered.
[ 2715.971481] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2715.971486] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2715.971497] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2715.971501] PIPELINE layers:
[ 2715.971505] dcaf5000 9ac15d93 RTAI 200
[ 2715.971509] c0383180 0 Linux 100
[ 2716.002345] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2716.003485] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2716.003499] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2716.003505] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 2716.003509] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2716.144545] RTAI[math]: loaded.
[ 2716.426360] config string '0x378 out '
[ 2718.311464] RTAI[math]: unloaded.
[ 2718.389360] SCHED releases registered named ALIEN RTGLBH
[ 2718.410490] RTAI[malloc]: unloaded.
[ 2718.508516] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2718.514777] I-pipe: Domain RTAI unregistered.
[ 2718.514795] RTAI[hal]: unmounted.
[ 2752.398832] I-pipe: Domain RTAI registered.
[ 2752.398854] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2752.398859] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2752.398870] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2752.398874] PIPELINE layers:
[ 2752.398878] dcaf5000 9ac15d93 RTAI 200
[ 2752.398882] c0383180 0 Linux 100
[ 2752.428733] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2752.429949] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2752.429962] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2752.429968] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 2752.429972] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2752.605305] RTAI[math]: loaded.
[ 2752.886728] config string '0x378 out '
[ 2755.086169] RTAI[math]: unloaded.
[ 2755.162495] SCHED releases registered named ALIEN RTGLBH
[ 2755.183804] RTAI[malloc]: unloaded.
[ 2755.283054] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2755.289333] I-pipe: Domain RTAI unregistered.
[ 2755.289350] RTAI[hal]: unmounted.
[ 2801.964222] I-pipe: Domain RTAI registered.
[ 2801.964251] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 2801.964255] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 2801.964290] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2801.964295] PIPELINE layers:
[ 2801.964299] dcaf5000 9ac15d93 RTAI 200
[ 2801.964303] c0383180 0 Linux 100
[ 2801.993637] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2801.994471] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2801.994483] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 2801.994489] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 2801.994493] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 2802.115087] RTAI[math]: loaded.
[ 2802.401945] config string '0x378 out '
[ 2804.221772] RTAI[math]: unloaded.
[ 2804.297767] SCHED releases registered named ALIEN RTGLBH
[ 2804.320800] RTAI[malloc]: unloaded.
[ 2804.418752] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2804.425061] I-pipe: Domain RTAI unregistered.
[ 2804.425078] RTAI[hal]: unmounted.
[ 3071.128880] I-pipe: Domain RTAI registered.
[ 3071.128902] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 3071.128907] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 3071.128918] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 3071.128922] PIPELINE layers:
[ 3071.128927] dcaf5000 9ac15d93 RTAI 200
[ 3071.128931] c0383180 0 Linux 100
[ 3071.160644] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 3071.161472] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 3071.161486] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 3071.161492] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1594945000 hz.
[ 3071.161496] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 3071.281217] RTAI[math]: loaded.
[ 3071.584024] config string '0x378 out '
[ 3073.487021] RTAI[math]: unloaded.
[ 3073.563056] SCHED releases registered named ALIEN RTGLBH
[ 3073.583932] RTAI[malloc]: unloaded.
[ 3073.682847] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 3073.689149] I-pipe: Domain RTAI unregistered.
[ 3073.689166] RTAI[hal]: unmounted.

Debug file information:
custom.hal:3: execv(./serial-relays.py) failed
custom.hal:8: pin 'serial-relays.relay1A' does not exist
7372
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

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

More
19 Jul 2009 23:14 #584 by mozmck
serial-relays.py should be in your config directory:

'/home/jerrybaca/emc2/configs/harborfrieghtmill'

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

More
20 Jul 2009 00:35 #585 by jerrybaca
i was afraid you would say that thjats where it is it is also made excutable or at least it say aloow to run as exucutable in properties
sorry but am a real novice w/ubuntu and emc2uld be somthing real obvious that i forgot or don't see

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

More
20 Jul 2009 01:12 #586 by mozmck
hmm, did you install python-serial?

Other than that, maybe the formatting got messed up in the python code when you copied it out. It is picky about the whitespace. I've attached a zipped copy of the file, just extract it and make sure it is executable in the properties and see if that fixes it.

File Attachment:

File Name: serial_relays.zip
File Size:1 KB
Attachments:
The following user(s) said Thank You: AlmeidaAlin3

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

More
20 Jul 2009 01:46 #587 by jerrybaca
getting closer it now sees the serial-relats but stillsays custom.hal:8: pin 'serial-relays.relay1A' does not exist
i think i just need to define them somehow

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

More
20 Jul 2009 02:05 #588 by mozmck
That's because there was some error in loading the component I believe. The component is what defines the pins. Is there any other message near that error?

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

More
20 Jul 2009 02:59 #589 by mozmck
Ok, I turns out I did not have the line quite right for loading the component. It worked fine on my one system but not on another one. In the custom.hal file you need to change the loadusr line to the following:

loadusr -Wn serial-relays ./serial-relays.py

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

More
20 Jul 2009 03:03 - 20 Jul 2009 03:08 #590 by jerrybaca
that seems to have done it for the loading i will try it w/the matrix but thanks in advance
Last edit: 20 Jul 2009 03:08 by jerrybaca.

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

More
20 Jul 2009 03:25 #591 by jerrybaca
NOT TO MAKE YOUR HEAD SWELL BUT DAM!! YOUR GOOD IT WORKS LIKE A CHARM
IF THERE IS ANYTHING I CAN DO IN RETURN LET ME KNOW

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

Time to create page: 0.240 seconds
Powered by Kunena Forum