Difference between revisions of "MC-Basic:RECORD"

From SoftMC-Wiki
Jump to: navigation, search
(fixed example)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:RECORD}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 4: Line 5:
  
 
|SYNTAX=
 
|SYNTAX=
RECORD ''<record file name> <number of points> ''{Gap = ''<record gap>''} {RingBuffer = ''<ON <nowiki>|</nowiki> OFF>''}  RecData = <''expression''>{, <''expression''>}*
+
RECORD <''record file name''> <''number of points''> {Gap = <''record gap''>} {RingBuffer = <''ON{{!}}OFF''>}  RecData = <''expression''>{, <''expression''>}
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 14: Line 15:
 
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).
 
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.
+
Negative value of ''<number of points>'' means ''<RingBuffer=On>'' and converted to positive number.  
  
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.
+
Optional <''RingBuffer>'' allows continuous 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 EtherCAT cycles between samples.  
  
 
{{Note|Data are recorded in realtime, so complex expressions add to the system load.
 
{{Note|Data are recorded in realtime, so complex expressions add to the system load.
Line 22: Line 25:
 
RECORD only defines the data to be recorded.  
 
RECORD only defines the data to be recorded.  
 
The actual recording process is triggered by RECORDON.}}
 
The actual recording process is triggered by RECORDON.}}
 +
 +
{{Note| setting negative value for number of points will result in activating continuous recording. Same as setting RingBuffer to ON.}}
 +
  
 
|TYPE=
 
|TYPE=
Line 37: Line 43:
 
''<record file name>'': Any filename extension must be REC.
 
''<record file name>'': Any filename extension must be REC.
  
''<number of points>'': 1 to MaxLong
+
''<number of points>'': -MaxLong to MaxLong
  
''<record gap>'': 1 to MaxLong
+
''<record gap>'': 1 to 64
  
 
|UNITS=
 
|UNITS=
Line 56: Line 62:
  
 
|EXAMPLE=
 
|EXAMPLE=
<pre>
+
Record Motion.rec 1000 Gap = 1RecData = a1.pcmd, a1.pfb, a2.pcmd, MyVar
Record Motion.rec 1000 Gap = 1 RecData = a1.pcmd, a1.pfb, a2.pcmd, MyVar
+
 
 
RecordOn
 
RecordOn
 +
 +
RecordOff
 +
 
RecordClose
 
RecordClose
</pre>
 
  
<pre>
 
Record Motion.rec -1000 Gap = 1 RecData = a1.pcmd, a1.pfb, a2.pcmd, MyVar
 
RecordOn
 
RecordClose
 
</pre>
 
  
 
|SEE ALSO=
 
|SEE ALSO=
 
* [[MC-Basic:RECORD$|RECORD$]]
 
* [[MC-Basic:RECORD$|RECORD$]]
* [[Axystems:MC-Basic:RECORDCLOSE|RECORDCLOSE]]
+
* [[MC-Basic:RECORDCLOSE|RECORDCLOSE]]
* [[Axystems:MC-Basic:RECORDING|RECORDING]]
+
* [[MC-Basic:RECORDING|RECORDING]]
* [[Axystems:MC-Basic:RECORDOFF|RECORDOFF]]
+
* [[MC-Basic:RECORDOFF|RECORDOFF]]
* [[Axystems:MC-Basic:RECORDON|RECORDON]]
+
* [[MC-Basic:RECORDON|RECORDON]]
  
[[Category:Axystems:MC-Basic:Data Recording|RECORD]]
+
[[Category:MC-Basic:Data Recording|RECORD]]
 
}}
 
}}

Latest revision as of 12:05, 18 May 2021

Language: English  • 中文(简体)‎

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).

Negative value of <number of points> means <RingBuffer=On> and converted to positive number.

Optional <RingBuffer> allows continuous 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 EtherCAT cycles between samples.

NOTE-Info.svgNOTE
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.
NOTE-Info.svgNOTE
setting negative value for number of points will result in activating continuous recording. Same as setting RingBuffer to ON.

Syntax

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

Availability

All versions

Type

<record file name>: File specification, including file name and extension.

<number of points>: Long

<ring buffer>: 1/0

<record gap>: Long

<expression>: Long, Double

Range

<record file name>: Any filename extension must be REC.

<number of points>: -MaxLong to MaxLong

<record gap>: 1 to 64

Scope

Task or Terminal

Limitations

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 can not be recorded .

Examples

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

RecordOn

RecordOff

RecordClose

See Also