Editing Pulse burst positioning

Jump to: navigation, search

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.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help page.

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.
<syntaxhighlight lang="c">
+
<pre>
 
void IncrementalMove( int distance )
 
void IncrementalMove( int distance )
 
{
 
{
Line 43: Line 43:
 
     SetPulseOutputPin(0);
 
     SetPulseOutputPin(0);
 
   }
 
   }
}</syntaxhighlight>
+
}</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.  
<syntaxhighlight lang="c">
+
<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;
}</syntaxhighlight>
+
}</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====
<syntaxhighlight lang="c">
+
<pre>IncrementalMove(500);
IncrementalMove(500);
+
 
WaitForMoveDone();
 
WaitForMoveDone();
 
IncrementalMove(1000);
 
IncrementalMove(1000);
 
WaitForMoveDone();
 
WaitForMoveDone();
 
IncrementalMove(-1500);
 
IncrementalMove(-1500);
WaitForMoveDone();</syntaxhighlight>
+
WaitForMoveDone();</pre>
[[category:Glossary]]
+
[[category:Technology]]
+
[[category:Application]]
+

Please note that all contributions to Granite Devices Knowledge Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Granite Devices Knowledge Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Select categories:

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Template used on this page: