Difference between revisions of "Axis Setup Procedure"

From SoftMC-Wiki
Jump to: navigation, search
(Step #1: declare axis)
(Step#2: Setting user friendly axis name)
Line 43: Line 43:
 
a1.AxisName = Xaxis
 
a1.AxisName = Xaxis
 
a2.AxisName = Lift
 
a2.AxisName = Lift
.
+
 
End Program
 
End Program
 +
</pre>
 +
 +
== Step#3: Preparing  general axis setup ==
 +
In order to set-up system axes one need to prepare setup program. Let’s call it SETUP.PRG. It is important to know:
 +
 +
* In order to access (write to) an axis property axis needs to be attached.
 +
* For some of the properties axis needs to be disabled
 +
 +
===SETUP.PRG===
 +
<pre>
 +
Program
 +
Call SetAxis(a1)
 +
Call SetAxis(a2)
 +
 +
End Program
 +
 +
Sub SetAxis(ax as generic  axis)
 +
With ax
 +
Attach
 +
En = 0
 +
 +
<stuff goes here>
 +
 +
Detach
 +
End With
 +
End Sub
 +
 
</pre>
 
</pre>

Revision as of 13:41, 28 July 2014

Introduction

This series of slides will explain how to create and set an axis in the softMC controller. For that you will need:

  • Running softMC (either a real, or virtual)
  • User interface (Control.Studio)

Step #1: declare axis

In the first line of CONFIG.PRG file write the number of axes that will be in use:

Sys.Naxes = <number>
…
Program
…
End Program


Send this file to MC and run it by issuing these two lines from terminal window:

send config.prg
reset all

Now you have your axes defined, it is easily to check issuing this command from terminal window:

->?axislist
A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17

Step#2: Setting user friendly axis name

System default axis name are not very user friendly (a1,a2,a3, …) It is a good practice to rename them into something more meaningful. This is done in CONFIG.PRG file only , assigning to each axis now name (no double quotes sign) to <axis>.AxisName property.


Sys.Naxes = <number>
…
Program
	a1.AxisName = Xaxis
	a2.AxisName = Lift
…
End Program

Step#3: Preparing general axis setup

In order to set-up system axes one need to prepare setup program. Let’s call it SETUP.PRG. It is important to know:

  • In order to access (write to) an axis property axis needs to be attached.
  • For some of the properties axis needs to be disabled

SETUP.PRG

Program
	Call SetAxis(a1)
	Call SetAxis(a2)	
	…
End Program

Sub SetAxis(ax as generic  axis)
With ax
	Attach
		En = 0
		…
		<stuff goes here>
		…
	Detach
End With
End Sub