09-26-2013 03:58 PM
Seems like this should be straight forwarded, but I have yet to see any results. Specifically I want to map the PXI_Trig0 line to a PFI line for output, but I have yet to capture an actual trigger pulse and just read 0V the entire time. My code is attached.
My specific goal is that I want to see the XNET "starttrigger" in my collected AI DAQ task. The DAQ task has to be started prior the XNET task, so this event gives me away to corelate the data. My approach to pass the data is as follows.
1.) Connect XNET starttrigger to PXI_Trig0 (Unfortunetly there are no external trigger lines on the XNET device)
2.) Connect PXI_Trig0 to PFI0
3.) Physically wire PFI0 zero to AI.
I am not getting any errors or warnings, just no visible trigger pulse on my AI. Hardware in use is a PXI-6229
09-27-2013 04:24 PM
After a bit more testing it appears this may have more to do with XNET than LabVIEW. I've attached two pieces of code. One triggers XNET off a DAQ task, this works. The other triggers DAQ off an XNET task, this does not work. Both export the PXI_trig on a PFI line, which appears to work and is read by an AI task correctly after physically wired.
The DAQ generated trigger appears to output a trigger value of 5V when the task is stopped and 0V when running.
The XNET generated trigger, drops from 5V to 0V as soon as the mapping happens, does not respond to the task starting and stoping and then goes back to 5V only after the task is cleared. This behavior also incorrectly causes the DAQ task to start before the XNET task.
After looking for examples, I can not seem to find any examples the do the later. They all seem to trigger XNET off of a DAQ task.
09-27-2013 05:58 PM
Hello,
Have you tried to start the the DAQmx task before the XNET task? When using the XNET to trigger the DAQmx task you will need to make sure the DAQmx task starts first.
Also, you could try using the DAQmx example program for Continuous Analog Input and set it to be triggered. Copy your existing code for the XNET task into the DAQmx example and make sure it sets a sets a trigger on the Trig_0. Then use the DAQmx example ensuring that it starts before the XNET task to aquire an arbitrary analog signal. This way, we can verrify whether or not the XNET device is actually sending a trigger signal on Trig_0.
Thanks,
09-30-2013 03:33 PM
Problem still exists even after adding the DAQ start vi and wiring for a dependency before starting the XNET task (my mistake, oops). But, the AO task is more or less just an intermediat step in checking that the Trigger/PFI line is updating. Which it is not. It will not be in the final program.
After having this same problem with my first code, I built these VI's up from examples to make sure I was starting with good code. I just kept changing it one step at a time. I can not find any examples that trigger a DAQ task to start from the XNET task.
10-01-2013 01:03 PM
Hello,
Unfortunately, There are no explicit LabVIEW examples that trigger the DAQmx task from an XNET task.
Is there a reason why you want the XNET to trigger the DAQmx task? Otherwise, there is an exapmle that does the opposite.
Thanks,
10-01-2013 04:38 PM - edited 10-01-2013 04:47 PM
The ultimate goal is to output the XNET start trigger on a PFI line. So you are correct, we do not really need to start a DAQ task from the XNET task, it was simply a step to verify that PXI_trig0 was functioning correctly, by having it start a DAQ task in addition to mapping it to PXI_trig0.
This fucionality should be supported, the XNET documentation states that XNET StartTrigger can be mapped to PXI_Trig0. PXI_Trig0 can be mapped to PFI0 as done in the working example.
What the code does:
1.) Connect PFI0 to PXI_Trig0
2.) Setup a DAQ task to start of PXI_Trig0 (Simply a test to verify the XNET StartTrigger is being exported correctly on this line. Will not be done in the final program)
3.) Connect XNET StartTrigger to PXI_Trig0
4.) Start XNET
An example starting a DAQ task from XNET would at least prove it works that far.
10-02-2013 09:54 AM
Okay, now I have a better understanding of what you are trying to do.
Have you tried just using a seperate DAQmx example such as Continuous Analog Input with a digital start trigger selected with PXI_Trig0 as the source?
What you would do is just run your XNET task in a seperate VI that places a trigger signal in PXI_Trig0. Make sure the DAQmx VI is running before you run the XNET VI.
If the DAQmx task starts, then you know the XNET VI correctly set the trigger.