http://nickpisca.com/BLAST/index.php?title=Stp.dll_DLLImport&feed=atom&action=historyStp.dll DLLImport - Revision history2024-03-29T09:54:59ZRevision history for this page on the wikiMediaWiki 1.28.1http://nickpisca.com/BLAST/index.php?title=Stp.dll_DLLImport&diff=328&oldid=prevNickpisca: Created page with " #region // dll setup data [DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)] public static extern int InitStp(); [DllImport("s..."2017-04-24T20:04:27Z<p>Created page with " #region // dll setup data [DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)] public static extern int InitStp(); [DllImport("s..."</p>
<p><b>New page</b></p><div> #region // dll setup data<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern int InitStp();<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool RunMotor1(<br />
int steps,<br />
int interval,<br />
int direction,<br />
int outputs<br />
);<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool RunMotor2(<br />
int steps,<br />
int interval,<br />
int direction,<br />
int outputs<br />
);<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool StopMotor1(<br />
int outputs);<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool StopMotor2(<br />
int outputs);<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool SetStepMode(<br />
int M1Mode,<br />
int M2Mode);<br />
[DllImport("stp.dll", SetLastError = true, CharSet = CharSet.Auto)]<br />
public static extern bool GetCurrentStatus(<br />
out int M1Active,<br />
out int M2Active,<br />
out int M1Steps,<br />
out int M2Steps,<br />
out int Inputs);<br />
#endregion<br />
<br />
<br />
<br />
This C# code I wrote is based on the VB code located on the PC-Controls stepper controller documentation: [https://www.pc-control.co.uk/images/StepperBee%20manual.pdf PC-Controls Docs]<br />
<br />
''Unrelated MEL scripting help located here: [http://stores.lulu.com/nickpisca YSYT]. <br />
[[Category:CSharp]]</div>Nickpisca