09-13-2012 03:59 AM
Which function in NI-DAQmx library corresponds to the function niSwitch_ConfigureScanTrigger from NI-SWITCH?
Solved! Go to Solution.
09-14-2012 03:40 AM
HI MirKoz!
As you can read in help, the niSwitch_ConfigureScanTrigger VI is used to configure the scan triggers for the scan list established with the niSwitch_ConfigureScanScanList VI. Not all of the switch modules supports scanning.
The niSwitch_ConfigureScanTrigger sets the location that the switch expects to receive an input trigger to advance through the scan list. This function also sets the location where it outputs a scan advanced signal after it completes an entry in the scan list.
Detalide help: http://zone.ni.com/reference/en-XX/help/375472F-01/switchviref/niswitch_configure_scan_trigger/
The Scan Delay input of the niSwitch_ConfigureScanTrigger VI Specifies the minimum amount of time the switch module waits before it asserts the scan advanced output trigger after opening or closing the switch.
The switch module always waits for debounce before asserting the trigger.
I searched for similar behaivour, and I found the DAQmx Switch Create Scan List VI in the following palette:
This VI creates a new switch scanning task with the sequence you specify in the scan list input. This scan list uses a special syntax to specify the sequence of connections and disconnections for the task.
If you use the ; caracter in the list, thedevice will wait for debounce, send scan advance output signal, then wait for trigger input.
You can use SW or HW based triggering, in exmaple finder you can find the Switch Scanning-SW Trigger.vi, which uses sw trigger.
The detailed help of the VI is avaliable here: http://zone.ni.com/reference/en-XX/help/370469AA-01/lvdaqmx/mxswitchcreatescanlist/
The syntax of the scan list is here: http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/scansyntax/
Could you tell me more from your application? It would help me to make better suggestions, but I hope this post will be useful for you.
Please let me know if it works.
Best regards,
09-18-2012 01:25 AM
HI MirKoz!
Did you manage to try out my suggestions?
Do you have any questions?
Please write a post, even when you tried out and it works.
Thank you!
Best regards,
09-21-2012 01:12 AM - edited 09-21-2012 01:14 AM
I had forgotten to mention that I am writing a program in LabWindows. The suggested function named DAQmxSwitchCreateScanList has partly similar behavior as niSwitch_ConfigureScanTrigger from NI-SWITCH. It only creates a task with the specified scan list and does not allow setting the location where a scan advanced signal is generated after an entry in the scan list is completed. I searched few hours and I have found the function DAQmxExportSignal which does this in DAQmx when its second parameter is DAQmx_Val_AdvCmpltEvent.
After all, thank you for your prompt response to my post.
Best regards,
Miroslaw Koziol
09-21-2012 08:17 AM
Hi MirKoz!
I'm glad that you was able to find the suitable fuction.
Actually I was automatically searching in Labview for the VI, but we are lucky that the two environments (Labview and Labwindows) have similar naming conventions.
If you don't have any other questions, regarding to this, I kindly ask you to colse the topic.
Best regards,