| 查看: 822 | 回复: 0 | ||
[求助]
使用session-based interface CounterOutputChannel控制电机移动
|
|
以前用老版本的interface编程思路是: 对电机发脉冲,通过设定步数来使让电机走几步。 但现在使用session-based interface后里面的属性都变了。 s = daq.createSession('ni'); ch = s.addCounterOutputChannel(DevicesID, 'ctr0', 'PulseGeneration'); 这是我的建立通道代码 我看了下s的属性 s.NumberOfScans, s.DurationInSeconds, s.Rate, s.IsContinuous, s.NotifyWhenDataAvailableExceeds, s.IsNotifyWhenDataAvailableExceedsAuto, s.NotifyWhenScansQueuedBelow, s.IsNotifyWhenScansQueuedBelowAuto, s.Vendor, s.Channels, s.IsRunning, s.IsLogging, s.IsDone, s.RateLimit, s.ScansQueued, s.ScansOutputByHardware, s.ScansAcquired 这些属性中我所使用的一个是s.NumberOfScans, s.DurationInSeconds, s.Rate三个。 我的问题是:之前我使用 s.DurationInSeconds, s.Rate来控制电机的移动,但是总是存在误差,后来改用s.NumberOfScans虽然设定了数量,但是误差依然存在。 matlab帮助文档里面对NumberOfScans的描述是这样的: When working with the session-based interface, use the DurationInSeconds property to change the duration of an acquisition. When the session contains output channels, DurationInSeconds becomes a read only property and its value is determined by s.scanQueued/s.Rate. 这又是什么意思。 我在想是不是不管我设置什么,matlab都会自动折算成时间。 |
» 猜你喜欢
宿州学院学报
已经有3人回复
4,4二甲基联苯干啥用,有懂得吗
已经有3人回复
医学类期刊求推荐
已经有6人回复
26/27申博自荐
已经有10人回复
招收2026级博士生
已经有3人回复
生活琐事由它去
已经有4人回复
提交了我也来说说感想
已经有12人回复
青B发送上会通知了吗
已经有9人回复
西安交大新媒学院副院长用撤稿论文结题
已经有6人回复
论文撤稿了
已经有8人回复












回复此楼