PMAC Product Guide CLOSE ; This closes the program buffer OPEN PLC 3 CLEAR CLOSE ; This erases PLC 3 CLOSE Function : Close the currently opened buffer. Scope : Global Syntax : CLOSE CLS This closes the currently opened buffer. This should be used immediately after the entry of a motion, PLC, rotary, etc. buffer. If the buffer is left open, subsequent statements that are intended as on-line commands (e.g. P1=0 ) will be entered into the buffer instead. Put CLOSE at the beginning and end of any file to be downloaded to PMAC. When PMAC receives a CLOSE command, it automatically appends a RETURN statement to the end of the open program buffer.
If any program or PLC in PMAC is improperly structured (e.g. no ENDIF or ENDWHILE to match an IF or WHILE ), PMAC will report an ERR003 at the CLOSE command for any buffer until the problem is fixed. Examples: CLOSE ; This makes sure all buffers are closed OPEN PROG 1 ; Open motion program buffer 1 CLEAR ; Clear out this buffer F1000 ; Program actually starts here!... X2500 ;...and ends on this line! CLOSE ; This closes the program buffer LIST PROG 1 ; Request listing of closed program F1000 ; PMAC starts listing X2500 RETURN ; This was appended by the CLOSE command {constant} Function : Assign value to variable P0, or to table entry. Scope : Global Syntax :
{constant} where {constant} is a floating point value This command is the equivalent of P0={constant} . That is, a value entered by itself on a command line will be assigned to P-Variable P0. This allows simple operator entry of numeric values through a dumb terminal interface. Where the value goes is hidden from the operator. The PMAC user program must take P0 and use it as appropriate. Note: If a special table on PMAC (e.g. STIMULUS , COMP ) has been defined but not filled, a constant value will be entered into this table, not into P0. Examples: In a motion program: P0=-1 ; Set P0 to an illegal value SEND Enter number of parts in run:
; Prompt operator at dumb terminal ; Operator simply needs to type in number WHILE (P0 ; Hold until get legal response 158 Online Commands