How to set trigger (analog input) ? (Session based interface)

2 ビュー (過去 30 日間)
Deroissart
Deroissart 2014 年 7 月 8 日
コメント済み: Nidhi Jain 2014 年 7 月 15 日
Hi everyone
I would like to add a trigger using an analog input as a reference channel. I'm using the session based interface and a NI PXIe device.
How can I make it? I've already read the example but it's for an external trigger using a switch.
Thank you for your answers.
GD

回答 (1 件)

Nidhi Jain
Nidhi Jain 2014 年 7 月 15 日
Hi,
Have you tried doing:
>>s=daq.createSession('ni');
>>addAnalogInputChannel(s,'PXI1Slot2','ai0','RTD');
>>addAnalogInputChannel(s,'PXI1Slot3','ai1','RTD');
>>tc=addTriggerConnection(s,'PXI1Slot2/PXI_Trig1','PXI1Slot3/PXI_Trig0','StartTrigger');
As long as you have mentioned the source and destination correctly, the trigger does not need to be external. You can refer the doc for more information:
  2 件のコメント
Deroissart
Deroissart 2014 年 7 月 15 日
Hi,
Does this code work when you're using one Slot on your PXI device?
Because I'm using a PXIe device with only one card on the PXISlot2.
And is the PXI_Trig1 an analog source? In the datasheet of my NI Card(NI 4499), it's mentionned that PXI_trig1 is a digital source for the trigger.
Thank you for your answer.
GD
Nidhi Jain
Nidhi Jain 2014 年 7 月 15 日
Hi,
When adding the trigger, the source and destination cannot be the same device so I think it won’t work if the same slot is mentioned for both source and destination.
The triggers PXi_Trig1 and PXI_Trig0 are digital triggers because the device I am using NI PXIe-4357 does not support analog triggers.
It looks like your device also supports only digital triggers so I think you won’t be able to add an analog trigger.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimultaneous and Synchronized Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by