Error using the command: set(ai_device, 'SamplePerTriger', 1000)

1 次查看(过去 30 天)
Hi,
Can anyone help. I am using script from the ADLINK (DAQ_MTLB) PDF and in which instruction are given how to extract the data from the control box using matlab but I am on the page where it ask me to use the command shown below but whenever I am using it, I am getting error below. Seraching on google taking me into drivers information which is not required just wondering anyone here can help:
Command:
set(ai_device, 'SamplePerTriger', 1000)
Error:
>> set(ai_device, 'SamplePerTriger', 1000)
Error using daqdevice/set (line 232)
Invalid property: 'SamplePerTriger'.

回答(1 个)

Mario Malic
Mario Malic 2021-3-10
编辑:Mario Malic 2021-3-10
Hi,
What's the output of
properties(ai_device)
Is it maybe SamplePerTrigger?
  1 个评论
muhammad choudhry
muhammad choudhry 2021-3-10
>> ai_device = analoginput('mwadlink', 0)
Display Summary of Analog Input (AI) Object Using 'USB-1901:5'.
Acquisition Parameters: 1000 samples per second on each channel.
1000 samples per trigger on each channel.
1 sec. of data to be logged upon START.
Log data to 'Memory' on trigger.
Trigger Parameters: 1 'Immediate' trigger(s) on START.
Engine status: Waiting for START.
0 samples acquired since starting.
0 samples available for GETDATA.
AI object contains no channels.
>> ai2 = addchannel(ai_device, 0)
Index: ChannelName: HwChannel: InputRange: SensorRange: UnitsRange: Units:
1 '' 0 [-10 10] [-10 10] [-10 10] 'Volts'
>> getsample(ai_device)
ans =
-3.8812
>> properties(ai_device)
No class analoginput.
it says here NO CLASS Input

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by