1. SPECIAL COMMANDS

1.1. Status

DirectionDataDescription
Tx transmit‘TT’ASCII character ‘T’ repeated twice
Rx receive‘TT’
+ 10 status bytes
see the description of the status record
total number of bytes to receive: 12 bytes

1.2. Short status

DirectionDataDescription
Tx ‘??’
Rxbyte1 byte2State (see the description of the State record) ErrCode total number of bytes to receive: 2 bytes (’??’ not echoed!):

1.3. Ready for communication?

DirectionDataDescription
Tx ‘Q’once only!
Rx’Q’
’T’
’E’
’Y’ or none
one of the following: ok to communicate
expecting the status (’T’) command error, send ’T’ to cancel error flag
busy

1.4. Reset the generator

DirectionDataDescription
Tx  ’PP’
Rxnone

2. COMMANDS NOT CONTAINING DATA

runR
stopS
normal burstG
burst and invert all waveformsB
end of data transferF (ends L, W, M commands)

2.1. Example

DirectionDataDescription
Tx ‘R’ ‘R’send 2 bytes
Rx‘R’ ‘R’ ErrCodereceive 3 bytes

3. COMMANDS CONTAINING DATA

3.1. Download all at STOP

Tx DataSizeDescription
‘L’byteASCII character ‘L’
‘L’byte (repeated)
selectbytedesignated channels; ‘1’ at bit position selects the channel
selectbyte (repeated)b0 = channel1,…,b7 = channel8; all ‘0’ = timing
countword= number of data words to follow; HiAddr = count-1
dataword
dataword
……words
undefined length (at least 8 bytes)

Download one by one (timing and all waveforms) and then send ‘F’ command.

3.2. Download waveform(s) at RUN

Tx DataSizeDescription
‘W’byte
‘W’byte
selectbytedesignated channels; ‘1’ at bit position selects the channel
selectbyte b0 = channel1,…,b7 = channel8; all ‘0’ = timing
countword= number of data words to follow; HiAddr = count-1
dataword
dataword
……words
undefined length (at least 8 bytes)

Download one by one (timing and all waveforms) and then send ‘F’ command.

For large number of data to be sent (>24k) stop the generator first, download and restart.

3.3. Send one data value

Tx DataSizeDescription
‘D’byte
‘D’byte
selectbytedesignated channels; ‘1’ at bit position selects the channel
selectbyte b0 = channel1,…,b7 = channel8; all ‘0’ = timing
addressworddefined as offset from memory start as: (pulse number)*2-2
datawordamplitude or pulse-width
undefined length (at least 8 bytes)

3.4. Multiple send 1 data value

Tx DataSizeDescription
‘M’byte
‘M’byte
selectbytedesignated channels; ‘1’ at bit position selects the channel
selectbyte b0 = channel1,…,b7 = channel8; all ‘0’ = timing
addressworddefined as offset from memory start as: (pulse number)*2-2
dataword
undefined length (at least 8 bytes)

3.5. Set software clock

Tx DataSizeDescription
‘C’byte
‘C’byte
dataword
undefined length (at least 8 bytes)

3.6. Setup

Tx DataSizeDescription
‘U’byte
‘U’byte
theClock Choicebytesee Setup codes
theModebytesee Setup codes
total length of the command: 4 bytes

3.7. Delete range of pulses

Tx DataSizeDescription
‘X’byte
‘X’byte
start addresswordinclusive, defined as offset (see ’D’ cmd)
pulse countword
total length of the command: 6 bytes

3.8. Insert range of pulses

Tx DataSizeDescription
‘I’byteASCII character, capital ‘i’
‘I’byte
before addresswordinclusive, defined as offset (see ’D’ cmd)
pulse countword
total length of the command: 6 bytes

3.9. Set amplitudes to zero in the range of pulses

Tx DataSizeDescription
‘Z’byteASCII character, capital ‘i’
‘Z’byte
selectbytedesignated channels; ‘1’ at bit position selects the channel
selectbyteb0 = channel1,…,b7 = channel8; all ‘0’ = timing
start addresswordinclusive, defined as offset (see ’D’ cmd)
pulse countword
total length of the command: 8 bytes

3.10. Roll waveform

Tx DataSizeDescription
‘O’byteASCII character, capital ‘o’, not ‘zero’
‘O’byte
selectbytedesignated channels; once only
directionbyteBoolean; right = TRUE, left = FALSE(0)
step countword
total length of the command: 6 bytes

3.11. Invert amplitudes of pulse selection in one waveform

Tx DataSizeDescription
‘V’byteASCII character, capital ‘o’, not ‘zero’
‘V’byte
selectbytedesignated waveform; one at a time only;
selectbytedesignation of timing not allowed
start addresswordinclusive, defined as offset (see ’D’ cmd)
pulse countword-1 means ’all’
total length of the command: 8 bytes

4. STATUS, STATE AND ERROR CODES

4.1. Status record

The status record contains 10 bytes.

Byte 1Variable Meaning  
b0XCLKmonitors the external clock
b1XTRGmonitors external start/stop signal
b2STARTcontrol signal (as placed by the microprocessor)
b3MEMswap control: =0 CPU accesses RAM1 and scanning counter <-> RAM2, (as placed by the microprocessor)
b4RSTextended reset signal (as placed by the microprocessor)
b5XIexternal/internal time-base clock choice (see below)
b6FSexternal/internal time-base clock choice (see below)
b7SOFTCKsoftware generated time-base output
Byte 2  Variable  Meaning
b0…5 not implemented
b6CLEARmonitors the real state of RUN/STOP, =0 running, =1 stopped
b7SWAPmonitors which RAM is being scanned for output (cf. MEM bit above)
Byte  Content  Description
Byte 3Card Maskbit b0…7 set if the corresponding output channel is installed and working properly
Byte 4Ready Flagif <>0 then the generator may accept the RUN command
Byte 5,6HiAddrhighest occupied RAM address
Byte 7model2 or 8-channel model
Byte 8decimal valuefirmware revision
Byte 9  State message  Meaning
b0XCLKmonitors the external clock
b1XTRGmonitors external start/stop signal
b2STARTcontrol signal (as placed by the microprocessor)
b3MEMswap control: =0 CPU accesses RAM1 and scanning counter <-> RAM2, (as placed by the microprocessor)
b4RSTextended reset signal (as placed by the microprocessor)
b5XIexternal/internal time-base clock choice (see below)
b6FSexternal/internal time-base clock choice (see below)
b7SOFTCKsoftware generated time-base output
Byte 10Error CodeMeaning
kNoError0 
kNotReady1 
kFramingError2serial i/f flags, bits 1..3
kNoiseFlag4 
kOverrun8 
kOverflow16data or command
kNotRecognized32 
kHardwareError64 
kTimeOutError128 

4.2. State codes

ConstantValueMeaning
kStopped0all bits must be 0
kRunning1 
kRunOut2STOP command received, finishing the waveform
kWaitSwap4one memory bank has been updated and WFG is waiting for the end of waveform to swap the memory banks and gain access to the other memory bank
kBurst8the single burst mode is selected
kPanel16external triggering selected
kUndefined32 
kArmed64ready to run
kExpectingData128current communication not completed

4.3. Setup codes

theModeHex valueMeaning
codeBurst0x04burst / continuous mode
codePane0x08enable external triggering
theClockChoiceHex value  Meaning
codeEclock0x6020 MHz internal clock
codeE2clock0x201 MHz internal clock
codeSoft0x40software-controlled internal clock (slow)
codeExt0x00external clock