Re: [Emc-users] Serial comms within a userspace component

2012-07-05 Thread Michael Haberler
It would help if you post the code and the invocation of the component on pastebin.com what you would want to do is: - pass the device *name* as an command line argument to the component - open the device - use the resulting *file descriptor* for examples how to pass command line arguments

Re: [Emc-users] Serial comms within a userspace component

2012-07-05 Thread Schooner
Hi Gene You did #include stdio.h I assume... Yes and unistd.h etc, as I said it compiles fine in both and runs properly from the command line I'm thinking that because of the type you used for 'fd', that it may well be volatile, and out of that functions 'scope' by the time you actually do the

Re: [Emc-users] Serial comms within a userspace component

2012-07-05 Thread Gene Heskett
On Thursday 05 July 2012 08:27:51 Schooner did opine: Hi Gene You did #include stdio.h I assume... Yes and unistd.h etc, as I said it compiles fine in both and runs properly from the command line I'm thinking that because of the type you used for 'fd', that it may well be volatile,

[Emc-users] Serial comms within a userspace component

2012-07-04 Thread Schooner
Hi I have been playing with a C userspace component to pass values from Linuxcnc to an arduino for display on a pendant LCD. The code works perfectly from a commandline program but when inserted into a component, it compiles and runs but each write(fd, buff, sizeof(buff)) goes to stdout /

Re: [Emc-users] Serial comms within a userspace component

2012-07-04 Thread Gene Heskett
On Wednesday 04 July 2012 14:32:06 Schooner did opine: Hi I have been playing with a C userspace component to pass values from Linuxcnc to an arduino for display on a pendant LCD. The code works perfectly from a commandline program but when inserted into a component, it compiles and runs