I see the question is wrong

The Q really should be...

Why does     sudo halcompile --install --userspace anycomp.comp

yield an RT comp? ( at least one requiring loadrt vs loadusr) ?

// the Q is really how to halcompile a python userspace comp
// becuz the --userspace is ignored and an rt comp is created
// using the logic comp from http://linuxcnc.org/docs/html/hal/comp.html
// i simply renamed the file as logicx1.py
// then
// (if necc)  $ sudo rm // /usr/lib/linuxcnc/modules/logicx1.so
// $ sudo halcompile --install --userspace logicx1.comp
// which showed
//Compiling realtime logicx1.c
//Linking logicx1.so
//cp logicx1.so /usr/lib/linuxcnc/modules/
//
// then I tried to load it with coint=3
// # halrun -I
// halcmd: loadusr logicx1 count=3 personality=0x102,0x305,0x503
// --- and got this merr
//<stdin>:1: execv(logicx1): No such file or directory
// --- then suspecting something was fubarred, i tried
// halcmd: loadrt logicx1 count=3 personality=0x102,0x305,0x503
// --- and it worked   so the --userspace is ignored w/o any warning or  msg
// Note: Using POSIX realtime
// -- then to be sure it had worked...
//halcmd: show pin
//Component Pins:
//Owner   Type  Dir         Value  Name
//     4  bit   OUT         FALSE  logicx1.0.and
//     4  bit   IN          FALSE  logicx1.0.in-00
//     4  bit   IN          FALSE  logicx1.0.in-01
//     4  s32   OUT             0  logicx1.0.time
//     4  bit   OUT         FALSE  logicx1.1.and
//     4  bit   IN          FALSE  logicx1.1.in-00
//     4  bit   IN          FALSE  logicx1.1.in-01
//     4  bit   IN          FALSE  logicx1.1.in-02
//     4  bit   IN          FALSE  logicx1.1.in-03
//     4  bit   IN          FALSE  logicx1.1.in-04
//     4  bit   OUT         FALSE  logicx1.1.or
//     4  s32   OUT             0  logicx1.1.time
//     4  bit   OUT         FALSE  logicx1.2.and
//     4  bit   IN          FALSE  logicx1.2.in-00
//     4  bit   IN          FALSE  logicx1.2.in-01
//     4  bit   IN          FALSE  logicx1.2.in-02
//     4  s32   OUT             0  logicx1.2.time
//     4  bit   OUT         FALSE  logicx1.2.xor
//

thx for any info

TomP


On 9/16/23 15:38, Thomas J Powderly wrote:
Hello

Is it possible to have multiple instances of a python comp?

Any example code?

Thanks

TomP



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

Reply via email to