matlab record,Record data and event information to file

record

Record data and event information to file

Syntax

record(obj)

record(obj,'switch')

Arguments

objAn instrument object.

'switch'Switch recording capabilities on or off.

Description

record(obj) toggles the recording state

for obj.

record(obj,'switch')

initiates or terminates recording for obj.

switch can be on or

off. If switch is

on, recording is initiated. If

switch is off, recording is

terminated.

Examples

This example creates the GPIB object g, connects

g to the instrument, and configures g to

record detailed information to the disk file MyGPIBFile.txt.

g = gpib('ni',0,1);

fopen(g)

g.RecordDetail = 'verbose';

g.RecordName = 'MyGPIBFile.txt';

Initiate recording, write the *IDN? command to the instrument,

and read back the identification information.

record(g,'on')

fprintf(g,'*IDN?')

out = fscanf(g);

Terminate recording and disconnect g from the

instrument.

record(g,'off')

fclose(g)

Tips

Before you can record information to disk, obj must be

connected to the instrument with the fopen function. A connected

instrument object has a Status property value of

open. An error is returned if you attempt to record

information while obj is not connected to the instrument. Each

instrument object must record information to a separate file. Recording is

automatically terminated when obj is disconnected from the

instrument with fclose.

The RecordName and RecordMode properties are

read-only while obj is recording, and must be configured before

using record.

For a detailed description of the record file format and the properties associated

with recording data and event information to a file, refer to Debugging: Recording Information to Disk.

Introduced before R2006a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值