Re: [Xenomai-core] Bug - Can 2 devices.

2010-09-02 Thread Rodolfo Oliveira
Hello Worlfgang,

Thank you for your help, I discovered that the problem was in my SOCK
application in user space, not in the kernel. You were very thoughtful,
thank you.

Rodolfo Romao.
Computer Engineer
MBA - IT Governance

2010/8/16 Rodolfo Oliveira rodolforo...@gmail.com

 hmm... it's really... ok !

 thnks

 2010/8/16 Wolfgang Grandegger w...@grandegger.com

  On 08/16/2010 08:32 PM, Rodolfo Oliveira wrote:
  Hi Wolfgang!
  I ran the rtcanrecv but this showing the following message:
  #. / Rtcanrecv
  / Home / testing / can.libs / lt-rtcanrecv: error while loading shared
  libraries: libnative.so.0: can not open shared object file: No such file
 or
  directory
  # Find. Z grep rtcanrecv
  . / Can / .svn / text-base / base rtcanrecv.c.svn
  . / Can / .deps / rtcanrecv.Po
  . / Can / .libs / rtcanrecv
  . / Can / .libs / lt-rtcanrecv
  . / Can / rtcanrecv
  . / Can / rtcanrecv.c
  . / Can / rtcanrecv.o
 
  You know what means this?

 I did already answer this question. See below.

 Wolfgang.

  2010/8/10 Wolfgang Grandegger w...@grandegger.com
 
  On 08/10/2010 08:22 PM, Rodolfo Oliveira wrote:
  Hello Wolf,
 
  When trying to run the program rtcanrecv is the following message:
  . / Rtcanrecv
  / Home / test / can /. / Libs / lt-rtcanrecv: error while loading
 shared
  libraries: libnative.so.0: can not open shared object file: No such
 file
  or
  directory.
 
  Can you help me?
 
  Either set LD_LIBRARY_PATH pointing to the Xenomai libraries or
 properly
  install the utilities as described in README.INSTALL.
 
  Wolfgang.
 
 
 
 




 --

 []´s



 ===
 Rodolfo R. de O. Neto, Eng. , MBA
 Engenheiro de computação
 MBA - Governança em TI
 E-mail: rodolforo...@gmail.com
 ===




-- 

[]´s



===
Rodolfo R. de O. Neto, Eng. , MBA
Engenheiro de computação
MBA - Governança em TI
E-mail: rodolforo...@gmail.com
===
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] analogy - experimental branch

2010-09-02 Thread Stefan Schaal
Hi Alexis,

 we are making great progress with our work. One issue that came up is whether 
it would be possible to add

   .stop_src = TRIG_COUNT,
   .stop_arg = n,

in the command structure, i.e., that the command terminates after n scans. 
Currently, when I try this, dmesg tells me that this method is not supported.

Best wishes,

-Stefan




On Aug 23, 2010, at 23:49, Stefan Schaal wrote:

 Hi Alexis,
 
 amazing progress!! And it works! I just ran my test program on our NI6259 
 board and got perfect performance. I quickly tested 5MHz  DIO rate, and it 
 appeared to work fine according to the square waves on the oscilloscope. 
 
 I will go back to developing our DAQ interface, and report back to the 
 Xenomai list about performance.
 
 Thanks so much
 
 Best wishes,
 
 -Stefan
 
 
 On Aug 23, 2010, at 16:09, Alexis Berlemont wrote:
 
 Hi,
 
 Stefan Schaal wrote:
 Hi Alexis,
 
 as usually, we are more than grateful that you are willing to spend time on 
 this issue. Here are answers to your questions:
 
 1) I tried CR_INVERT -- no success
 2) I tried very slow frequencies like 10Hz in the counter clock (which is 
 nicely visualized on my oscilloscope) -- no success
 3) I tried to send a 0 with cmd_bits -- and interestingly, this ALSO takes 
 my DIO line high (sorry, I thought I had tested this before). This would 
 indicate that we do not access the FIFO at all?
 4) I have my own test program to send alternating 0x and 0x0 values 
 to the devices to generate a square wave on the oscilloscope. I cannot see 
 anything of the square wave executed.
 
 
 At last, it comes!!!
 
 Thanks to your test program and your help, I think I have fixed this
 bug. Could you clone my git repository (branch analogy), and give it a
 try with your own test program.
 
 There was a bug in the mite configuration which explained why the
 wrong data were sent to the DIO subdevice. That was also the reason
 why no interrupt came from the mite.
 
 Best wishes,
 
 -Stefan
 
 
 On Jul 19, 2010, at 15:01, Alexis Berlemont wrote:
 
 Hi,
 
 Sorry for answering late. 
 
 Stefan Schaal wrote:
 Hi Alexis,
 
 I managed to port some of the Comedi examples to Analogy. In particular, 
 I could configure one of my counter subdevices to become a high frequency 
 clock, following the gpct_pulse_generator.c example. I routed the output 
 of the clock to my PFI0 pin, and could visualize the signal on an 
 oscilloscope. Thus, I know have the clock I need to trigger CMD-based 
 DIO, as you suggested. (I will post some sample code of this in the near 
 future after all is cleaned up).
 
 Next, I went back to cmd_bits.c and try to make it work on my NI6259 
 board. For scan_begin_src=TRIG_EXT   I need to choose scan_begin_arg = 28 
 (which is kCDO_Update_Source_SelectG0_Out in the NI documentation, and 
 NI_CDIO_SCAN_BEGIN_SRC_G0_OUT in the comedi.h file).
 
 When running cmd_bits.c in this way and monitoring the DO channels on an 
 oscilloscope, the DO switches to HIGH when the acquisition is triggered 
 (i.e., the value of the first element in the FIFO), but the FIFO is not 
 processed any further, i.e., not emptied. If I DO NOT run the 
 counter-clock above, the DO does not even switch to HIGH. I also checked 
 whether 28 is the right value for scan_begin_arg by trying a wide range 
 of values, but only for scan_begin_arg = 28 I get the DO bit switched to 
 HIGH at the beginning of the acquisition.
 
 In Comedi, the cmd.flags is set to CMDF_WRITE for such externally 
 triggered acquisitions, which I tried, but it did not help.
 
 Thus, it appears that I still have a problem in processing the FIFO, 
 despite it appears that all other things are now correctly connected 
 (Comedi has an example do_waveform.c, which is pretty much what I try to 
 use for testing in my own code).
 
 Would you have any thoughts on what might go wrong? It looks like we are 
 just a tiny bit away from succeeding with cmd_bits.c on my board.
 
 
 I had time to have a look at your problem. Unfortunately, I do not
 have any solution. I just have some questions you may find stupid:
 
 - Did you try to invert the sample clock polarity by setting the flag
 CR_INVERT in the command field scan_begin_arg?
 - Which frequencies did you generate with the counter subdevice? Even
 the lowest one did nothing (Something like 10Hz)?
 - Did you try to send 0 with cmd_bits ? Just to check that the DO stay
 to LOW, which would mean that the values (or at least the first one)
 are properly loaded into the device.
 - So far, cmd_bits always sends the same value (the one you passed as
 argument); we should modify it so that the complement value is
 written every two samples. That would allow us to physically check
 how many samples are played by the DO. 
 
 Best wishes,
 
 -Stefan
 
 
 
 
 
 On Jul 14, 2010, at 17:46, Stefan Schaal wrote:
 
 Hi Alexis,
 
 in the Comedi examples 
 (http://www.comedi.org/download/comedilib-0.8.1.tar.gz, the 
 do_waveform.c example), they suggest to use