ED

Syntax:Implicit Only
Operands:_ED1,_ED
Burn:not burnable

Edit

Hardware: All

Full Description

Using Telnet style interface (not Galil Software). The ED command puts the controller into the Edit subsystem. In the Edit subsystem, programs can be created, changed, or destroyed. The commands in the Edit subsystem are the following.

ED Commands
Key CombinationFunction
DDeletes a Line
IInserts a line before the current
PDisplays the previous line
QExits the ED subsystem
EnterSaves a line and moves cursor to next

Arguments

ED m

where
     m specifies the line number to begin editing. The default line number is the last line of program space with commands.

Operand Usage

_ED contains the line number of the last line to have an error.
_ED1 contains the number of the thread where the error occurred (for multitasking).
_ED4 when evaluated in an embedded code thread, this operand will contain the thread id of the calling thread. This is useful for DMC code to determine which thread it is running in. See example below.

Usage

Usage and Default Details
UsageValue
While MovingNo
In a ProgramNo
Command LineYes

Related Commands

DL - Download
UL - Upload

Examples:

ED	
0 #START	
1 PR 2000	
2 BGA	
3 SLKJ	Bad line
4 EN	
5 #CMDERR	Routine which occurs upon a command error
6 V=_ED	
7 MG "An error has occurred" {n}	
8 MG "In line", V{F3.0}	
9 ST	
10 ZS0	
11 EN	
Hint:  Remember to quit the Edit Mode prior to executing or listing a program.
'Using _ED4
XQ#id,1
XQ#id,2
XQ#id,3
XQ#id,4
XQ#id,5
XQ#id,6
XQ#id,7
#id
MG{Z10.0}"This message is from thread",_ED4
EN

' Returns...
' :XQ
' This message is from thread 1 
' This message is from thread 2 
' This message is from thread 3 
' This message is from thread 4 
' This message is from thread 5 
' This message is from thread 6 
' This message is from thread 7 
' This message is from thread 0