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

2 views (last 30 days)
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'.

Answers (1)

Mario Malic
Mario Malic on 10 Mar 2021
Edited: Mario Malic on 10 Mar 2021
Hi,
What's the output of
properties(ai_device)
Is it maybe SamplePerTrigger?
  1 Comment
muhammad choudhry
muhammad choudhry on 10 Mar 2021
>> 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

Sign in to comment.

Categories

Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!