14.01.2015 Views

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

General <strong>Guide</strong>lines for Syntax<br />

<strong>Guide</strong>line Topic <strong>Guide</strong>line Examples<br />

Neutral Characters<br />

• Space ()<br />

• Tab ()<br />

Comm<strong>and</strong> Delimiters:<br />

• Carriage rtn ()<br />

• Line feed ()<br />

• Colon (:)<br />

Case Sensitivity<br />

Comment Delimiter (;)<br />

Using neutral characters anywhere within a<br />

comm<strong>and</strong> will not affect the comm<strong>and</strong>.<br />

(In the examples on the right, a space is<br />

represented by , a tab is ), <strong>and</strong> a<br />

carriage return is )<br />

All comm<strong>and</strong>s must be separated by a<br />

comm<strong>and</strong> delimiter. A carriage return is the<br />

most commonly used delimiter. To use a line<br />

in a live terminal emulator session, press<br />

ctrl/J. The colon (:) delimiter allows you to<br />

place multiple comm<strong>and</strong>s on one line of code,<br />

but only if you add it in the program editor (not<br />

during a live terminal emulator session).<br />

There is no case sensitivity. Use upper or<br />

lower case letters within comm<strong>and</strong>s.<br />

All text between a comment delimiter <strong>and</strong> a<br />

comm<strong>and</strong> delimiter is considered program<br />

comments.<br />

Set velocity to 10 rps:<br />

V10 <br />

Add a comment to the comm<strong>and</strong>:<br />

V 10 ;set velocity <br />

Set acceleration to 10 rev/sec/sec:<br />

A 10<br />

A 10<br />

A 10: V 25: D 25000: GO<br />

Initiate motion<br />

GO<br />

go<br />

Add a comment to the comm<strong>and</strong>:<br />

V10 ;set velocity<br />

Field Separator (,)<br />

Comm<strong>and</strong>s with the symbol r or i in their<br />

Syntax description require field separators.<br />

INSGLP EXAMPLE<br />

Global Comm<strong>and</strong><br />

Identifier (@)<br />

When you wish to set the comm<strong>and</strong> value<br />

equal on all axes, add the @ symbol at the<br />

beginning of the comm<strong>and</strong> (enter only the<br />

value for one comm<strong>and</strong> field).<br />

Check the status of all digital outputs (onboard, <strong>and</strong><br />

on external I/O bricks):<br />

@OUT<br />

Bit Select Operator (.)<br />

Left-to-right Math<br />

Binary <strong>and</strong> hexadecimal<br />

values<br />

Multi-tasking Task<br />

Identifier (%)<br />

The bit select operator allows you to affect<br />

one or more binary bits without having to enter<br />

all the preceding bits in the comm<strong>and</strong>.<br />

Syntax for setup comm<strong>and</strong>s:<br />

[comm<strong>and</strong> name].[bit #]-[binary value]<br />

Syntax for conditional expressions:<br />

[comm<strong>and</strong> name].[bit #]=[binary value]<br />

All mathematical operations assume<br />

left-to-right precedence.<br />

When making assignments with or<br />

comparisons against binary or hexadecimal<br />

values, you must precede the binary value<br />

with the letter “b” or “B”, <strong>and</strong> the hex value<br />

with “h” or “H”. In the binary syntax, an “x”<br />

simply means the status of that bit is ignored.<br />

Use the % comm<strong>and</strong> prefix to identify the<br />

comm<strong>and</strong> with a specific task.<br />

Enable error-checking bit #9:<br />

ERROR.9-1<br />

Enable error-check bits #9-12:<br />

ERROR.9-1,1,1,1<br />

IF statement based on value of axis status bit #12:<br />

IF(AS.12=b1)<br />

VAR1=5+3*2<br />

Result: Variable 1 is assigned the value of<br />

16 (8*2), not 11 (5+6).<br />

Binary: IF(IN=b1x01)<br />

Hexadecimal: IF(IN=h7F)<br />

Launch the “move1” program in Task 1:<br />

1%move1<br />

Check the error status for Task 3:<br />

3%TER<br />

Check the system status for Task 3:<br />

3%TSS<br />

NOTE: The comm<strong>and</strong> line is limited to 100 characters (excluding spaces).<br />

6 Gem6K Series Programmer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!