07-20-2005 05:59 PM
I have not been able to get more than one line to route dynamically. Here is the setup code:
viUnmapTrigger(instr, VI_TRIG_TTL6, VI_TRIG_TTL6);
viUnmapTrigger(instr, VI_TRIG_TTL5, VI_TRIG_TTL5);
checkErr(viSetAttribute(instr, VI_ATTR_PXI_SRC_TRIG_BUS, 2));
checkErr(viSetAttribute(instr, VI_ATTR_PXI_DEST_TRIG_BUS, 1));
checkErr(viMapTrigger(instr, VI_TRIG_TTL5, VI_TRIG_TTL5, VI_NULL));
checkErr(viMapTrigger(instr, VI_TRIG_TTL6, VI_TRIG_TTL6, VI_NULL));
checkErr(viSetAttribute(instr, VI_ATTR_PXI_SRC_TRIG_BUS, 2));
checkErr(viSetAttribute(instr, VI_ATTR_PXI_DEST_TRIG_BUS, 3));
checkErr(viMapTrigger(instr, VI_TRIG_TTL5, VI_TRIG_TTL5, VI_NULL));
checkErr(viMapTrigger(instr, VI_TRIG_TTL6, VI_TRIG_TTL6, VI_NULL));
When both TTL5 and TTL6 are setup using viMapTrigger() I get the following error when calling niTClk_ConfigureForHomogeneousTriggers() for the second group. I am able to map one of the TTL lines across busses but not both. Any ideas?
Error fffc2f4f: NI-TClk committed a session, and the instrument driver reported
an error.
Session index (starts at zero): 0
Error reported by the instrument driver:
DAQmx Error -89126 occurred:
Trigger line requested could not be reserved because it is already in use.
Property: Marker Event Output Terminal
Destination Device: Scan1
Status Code: -89126
Status Code: -250033
07-21-2005 10:08 PM
Hi tonys10,
Why are you both manually mapping trigger lines using viMapTrigger AND automatically configuring the crosspoint switches using niTClk_ConfigureForHomogeneousTriggers? When you use viMapTrigger you are reserving the trigger lines. This may be why you receive the error. I am assuming niTClk_ConfigureForHomogeneousTriggers is all you want to do.
If you desire to manually map the trigger lines, please follow the instructions in the attached pdf. These instructions are also documented in the NI-TClk Synchronization Help.
Please let me know if you have further questions or if this does not resolve your issue!
Chad AE
Applications Engineer
07-21-2005 10:09 PM