From SoftMC-Wiki
Jump to: navigation, search

This command is used to arm (not trigger) data recording. Data are recorded into the specified file, which is then retrieved for viewing. The record file must always have the extension REC. The recorded data file is stored on RAM drive, so the file is lost after power off.

You must specify the <number of points> to be recorded, where one point is a set of data recorded at a given instant in time. The recorder may be stopped before the specified number of points have been recorded (using RECORDOFF).

Optional <RingBuffer> allows continous recording until recorder is either paused or stopped. In that case only last <number of points> records are kept.

The time between successive samples of the data is given by <record gap>, which specifies the number of SERCOS cycles between samples. A maximum of six expressions may be recorded.

Data are recorded in realtime, so complex expressions add to the system load.

Recording of expressions containing strings, points or structures may result in an overlap error, due to memory allocation processes. RECORD only defines the data to be recorded.

The actual recording process is triggered by RECORDON.


RECORD$ <record file name> <number of points> {RingBuffer = <ON | OFF>}  {Gap = <record gap>} RecData = <expression>{, <expression>}*


All versions


<record file name>: String, including file name and extension.
<number of points>: Long

<ring buffer>: 1/0

                             <record gap>: Long

<expression>: Long, Double


<record file name>: Any filename extension must be REC.
<number of points>: 1 to MaxLong
<record gap>: 1 to MaxLong


Task or Terminal


The record file is stored on the RAM drive, so size is limited. Recording stops if there is no space available on the RAM drive. A RECORDCLOSE command must be issued before a second RECORD command is issued.

Local variables cannot be recorded.


Record$ “Motion.rec” 1000 Gap = 1RecData = a1.pcmd, a1.pfb, a2.pcmd, MyVar

Dim shared RecFileString as string = “Motion.rec”

Record$ RecFileString 1000 Gap = 1 RecData =a1.pcmd, a1.pfb, a2.pcmd, MyVar



Record$ RecFileString 1000 RingBuffer=On RecData = a1.pcmd, a1.pfb, a2.pcmd, MyVar



See Also