PDA

View Full Version : New system variables????



davidallen
06-27-2001, 07:50 PM
the programmers handbook lists system variables up to around %(22). the new home program uses %(53). is there a complete list of system variables available?

da

Ted Hall, ShopBot
06-29-2001, 05:49 PM
Hi David,

You are really paying attention! Yes we have made some more system variables available ... and yes, the ability to check the value of switches in a fashion other than using the ON INPUT interrupt is very useful. (And yes, others can have a look at how they are used in the S_Home2.sbp sample file.)

Here is a full listing of the currently available system variables. I'd like to mention two more things about these variables:

-There are some situations, such as within a stack of moves, where to insure that the system variable value is fully updated at the time of the call, you may need to precede it with an SC,2 Command. The 'SC,2' forces and update of the Movement Stack activity and also an update of the system variables.

-We will increasingly make more system variables available. Adding more system variables, because most must be continuously updated as the tool moves, consumes processing time. This is not an issue on a fast Pentium. However, on a 386, adding variables has a measurable impact on top speed. This is why we have been conservative in making these variables available.

ShopBot System Variables [accessed as %(variable number)]:
These are Read-Only Variables; However, note that most of these
values are set with regular ShopBot Commands
-------------------------------------------------------------------------------------------

%(1) = Current Location of X Axis (in inches or mm)
%(2) = Current Location of Y Axis (in inches or mm)
%(3) = Current Location of Z Axis (in inches or mm)
%(4) = Current Location of Acc Axis (in inches or mm)

%(6) = current location of X axis in ShopBot Units (of limited use in Part File software)
%(7) = current location of X axis in ShopBot Units (of limited use in Part File software)
%(8) = current location of X axis in ShopBot Units (of limited use in Part File software)

%(9) = Encoder error X Axis (for use with cable-drive tools)
%(10) = Encoder error Y Axis (for use with cable-drive tools)
%(11) = Steps per Encoder unit X Axis (for use with cable-drive tools)
%(12) = Steps per Encoder unit Y Axis (for use with cable-drive tools)
%(13) = Current Encoder location X axis (for use with cable-drive tools)
%(14) = Current Encoder location Y axis (for use with cable-drive tools)

%(15) = Low Limit Value Z Axis
%(16) = Hi Limit Value Z Axis
%(17) = Low Limit Value Acc Axis
%(18) = Hi Limit Value Acc Axis

%(20) = Current Cutter Diameter in software

%(21) = Current Distance Setting (Absolute-0; Relative-1)
%(22) = Current Move Mode Setting (Cut/Move Mode-0; Preview Mode-1)

%(25) = Initial Segment Size (cable-derive tools)
%(26) = Stall Threshold (cable-derive tools)
%(27) = Tolerance (cable-derive tools)
%(28) = Start Tolerance (cable-derive tools)

%(31) = Unit Value X Axis
%(32) = Unit Value Y Axis
%(33) = Unit Value Z Axis
%(34) = Unit Value Acc Axis

%(50) = Current Composite Encoder Reading (4 hight bits)
%(51) = Status Input #1 (0-OFF; 1-ON)
%(52) = Status Input #2 (0-OFF; 1-ON)
%(53) = Status Input #3 (0-OFF; 1-ON)
%(54) = Status Input #4 (0-OFF; 1-ON)

We'll post these on the main announcement board, and they will be updated in the manuals.

davidallen
07-02-2001, 08:42 AM
thanks,

there are a couple that look real interesting.

da