View previous topic :: View next topic |
Author |
Message |
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
qei motion control |
Posted: Tue Apr 30, 2019 12:31 am |
|
|
How do I reset the position in qei? Does anyone know the Commune? _________________ Es |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Tue Apr 30, 2019 1:29 am |
|
|
qei_set_count
If you are using the index, then if this is to 'zero' the qei completely, the
the index_count will also need to be reset. |
|
|
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
|
Posted: Tue Apr 30, 2019 1:42 am |
|
|
how so;
qei_get_count (0);
will I write this? _________________ Es |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19587
|
|
Posted: Tue Apr 30, 2019 2:11 am |
|
|
qei_get_count(0), returns the current count from qei module 0.
qei_set_count, allows you to _set_ the count on a qei module.
So:
qei_set_count(0,0);
Will set module 0, to a zero count.
So if you did:
qei_set_count(0,0);
val=qei_get_count(0);
Bar any fast pulses coming in between the two instructions, you should
find you get back a count of '0'. |
|
|
|