Editing Pulse burst positioning
Your changes will be displayed to readers once an authorized user accepts them. (help) |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 24: | Line 24: | ||
====Doing incremental move==== | ====Doing incremental move==== | ||
The C-style code below generates the signaling. | The C-style code below generates the signaling. | ||
− | < | + | <pre> |
void IncrementalMove( int distance ) | void IncrementalMove( int distance ) | ||
{ | { | ||
Line 43: | Line 43: | ||
SetPulseOutputPin(0); | SetPulseOutputPin(0); | ||
} | } | ||
− | }</ | + | }</pre> |
* SetPulseOutputPin sets the digital state of HSIN1 pin on Argon | * SetPulseOutputPin sets the digital state of HSIN1 pin on Argon | ||
Line 50: | Line 50: | ||
====Monitoring when motion is complete==== | ====Monitoring when motion is complete==== | ||
Returns ''true'' when motion has successfully finished. ''False'' if timeout expired or drive faulted. | Returns ''true'' when motion has successfully finished. ''False'' if timeout expired or drive faulted. | ||
− | < | + | <pre>bool WaitForMoveDone( double timeout ) |
− | bool WaitForMoveDone( double timeout ) | + | |
{ | { | ||
double waited=0; | double waited=0; | ||
Line 70: | Line 69: | ||
/*return false because timeouted */ | /*return false because timeouted */ | ||
return false; | return false; | ||
− | }</ | + | }</pre> |
*GetMotionCompletePinState reads the GPO1 pin state from [[Argon]] | *GetMotionCompletePinState reads the GPO1 pin state from [[Argon]] | ||
*GetFaultPinState reads the GPO3 pin state from [[Argon]] | *GetFaultPinState reads the GPO3 pin state from [[Argon]] | ||
====Usage example==== | ====Usage example==== | ||
− | < | + | <pre>IncrementalMove(500); |
− | IncrementalMove(500); | + | |
WaitForMoveDone(); | WaitForMoveDone(); | ||
IncrementalMove(1000); | IncrementalMove(1000); | ||
WaitForMoveDone(); | WaitForMoveDone(); | ||
IncrementalMove(-1500); | IncrementalMove(-1500); | ||
− | WaitForMoveDone();</ | + | WaitForMoveDone();</pre> |
− | + | ||
− | + | ||
− | + |