[etherlab-users] Beckhoff Serial-port module EL6002 reading slow
Jason Xu
jason at motiondesign.co.nz
Wed May 19 01:55:04 CEST 2010
Hi Florian and support team :
I Just find out the reading slow problem is due to the default Baud rate
(9600), which works out about 1 ms per character transmitting speed.
Consider 2 scan cycles to achieve one read, the reading speed (collecting
one character in every 2 ms) is correct. In order to have faster reading,
higher baud rate has to be set.
I'd like to know how to change the default settings (Baud rate, etc) without
using TwinCAT. From EL6002 document, it seems that 8000:11 is the entry
index to access. However any detail on how to do would be very helpful.
Thanks in advance.
Jason
>
> Hi Florian and support team :
>
> I've got a Beckhoff Serial-port module EL6002, and want to use it under CoE
> protocol with 1000hz scan rate in RTAI (Master: ethercat-1.4.0-rc3).
>
> I manage to write a simple c program by the following logic:
>
> (1) Check 6000:02 to see if "Receive request" is true.
> (2) if true, get data_length
> (3) Read data from 6000:17 to 6000:data_length
> (4) Set 7000:02 (Receive accepted) to 1,
> (5) continue to read until "receive request" is false
> (6) Set "receive accepted" to 0.
>
> I found out it takes about 2 ms to read one character. For a simple
> 8-character barcode, the module does not transfer all the characters in one
> go, it takes a few round to transfer all the characters. Why is that? The
> module has 22 data-in. Did I do something wrong? Any other flag need to
> check or assign to make it reading faster? The module is generally in
> default settings (Baud rate 9600, 1N8). Module serial number: 1610 0101
>
> Thanks in advance.
>
> Jason Xu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20100519/4326f7c1/attachment-0003.htm>
More information about the Etherlab-users
mailing list