Home > Archive > Matlab > March 2007 > RS232 connection
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Emanuele 2007-03-30, 7:11 pm |
| Hi !
First, thanks for your attention, second thanks for your eventual
support.
I got a problem: I am reading an USB encoders (Gurley Precision
Instr) with Matlab - the USB works as a COM port, I am able to read
the encoder with:
load GPI_encoder; obj1 = GPI_encoder;
fopen(obj1);
% data = query(obj1, 'A', '%c', '%s')
tic,
fprintf(obj1, '%c', 'A');
data = fscanf(obj1, '%s'),
toc
I can send to you more details on the port, etc.
PROBLEM: it takes 15-50 ms (variable) to have the data back (too long
!). I need to be faster (at least 10 ms), with Labview it takes 6-7
ms.
Any suggestion, help ? Probably some setting on obj1 is wrnog, we
looked at every attribute of obj1 but we don't know where we can put
our hands...
Any suggestion and/or check to do, and/or auto-config and/or tool to
reduce the time ?
Thanks a lot !!
Emanuele Secco
<http://www3.deis.unibo.it/Staff/Fel...ueleLindoSecco/>
| |
|
| Emanuele wrote:
>
>
> Hi !
> First, thanks for your attention, second thanks for your eventual
> support.
>
> I got a problem: I am reading an USB encoders (Gurley Precision
> Instr) with Matlab - the USB works as a COM port, I am able to read
> the encoder with:
>
> load GPI_encoder; obj1 = GPI_encoder;
> fopen(obj1);
> % data = query(obj1, 'A', '%c', '%s')
> tic,
> fprintf(obj1, '%c', 'A');
> data = fscanf(obj1, '%s'),
> toc
>
> I can send to you more details on the port, etc.
> PROBLEM: it takes 15-50 ms (variable) to have the data back (too
> long
> !). I need to be faster (at least 10 ms), with Labview it takes 6-7
> ms.
>
> Any suggestion, help ? Probably some setting on obj1 is wrnog, we
> looked at every attribute of obj1 but we don't know where we can
> put
> our hands...
> Any suggestion and/or check to do, and/or auto-config and/or tool
> to
> reduce the time ?
> Thanks a lot !!
> Emanuele Secco
> <http://www3.deis.unibo.it/Staff/Fel...ueleLindoSecco/>
have you asked GPI? maybe they have seen this question from another
customer.
| |
| Emanuele 2007-03-30, 7:11 pm |
| I did, no reply.
Thanks, emanuele
Emanuele wrote:
>
>
> Hi !
> First, thanks for your attention, second thanks for your eventual
> support.
>
> I got a problem: I am reading an USB encoders (Gurley Precision
> Instr) with Matlab - the USB works as a COM port, I am able to read
> the encoder with:
>
> load GPI_encoder; obj1 = GPI_encoder;
> fopen(obj1);
> % data = query(obj1, 'A', '%c', '%s')
> tic,
> fprintf(obj1, '%c', 'A');
> data = fscanf(obj1, '%s'),
> toc
>
> I can send to you more details on the port, etc.
> PROBLEM: it takes 15-50 ms (variable) to have the data back (too
> long
> !). I need to be faster (at least 10 ms), with Labview it takes 6-7
> ms.
>
> Any suggestion, help ? Probably some setting on obj1 is wrnog, we
> looked at every attribute of obj1 but we don't know where we can
> put
> our hands...
> Any suggestion and/or check to do, and/or auto-config and/or tool
> to
> reduce the time ?
> Thanks a lot !!
> Emanuele Secco
> <http://www3.deis.unibo.it/Staff/Fel...ueleLindoSecco/>
|
|
|
|
|