06-07-2006 06:29 PM
06-08-2006 11:36 AM
Hello Gord,
Although I cannot find an example program that does this specifically, you can use the DAQmx Export Signal or DAQmx Connect Terminal VIs. The use of these is explained in this knowledgebase.
Let us know if you have additional questions about this. What internal signal are you trying to route?
Regards,
Laura
06-08-2006 12:02 PM
Laura,
We're doing this under the QNX 4 OS using the DDK, so DAQmx isn't an option.
I would like to route ai/SampleClock and ai/ConvertClock on our PCI-6259 and PCI-6225 cards so that we can externally verify what we think we are doing in software configuration settings.
Gord
06-08-2006 12:58 PM
Hi Gord,
Thanks for the clarification - I missed that this was in the DDK forum 🙂
Thanks,
Laura
06-08-2006 02:27 PM
Hi Gord-
In order to route the internal timing signals you first need to specify the direction map for the PFI lines. To do this you use:
Address: 0x172 |
This 16-bit register determines the line directions for the 16 PFI lines. A value of '1' indicates Output and '0' indicates Input. There is a one-to-one correspondence between the bit order in this register and the PFI lines as enumerated in the device pinouts.
You then need to select the signal to route to your output lines. A 5-bit representation is used to choose various internal signals. ai/SampleClock is referred to by 0x2 and ai/ConvertClock is referred to by 0x3. The 16-bit registers at these offsets contain the configuration fields for 3 PFI lines each:
This should get you started. Let me know if you have any additional questions.
Thanks-
06-11-2006 03:21 PM
//Set PFI 1 to output ai/ConvertClock
board->IO_Bidirection_Pin.writePFI1_Pin_Dir (tMSeries::tIO_Bidirection_Pin::kPFI1_Pin_DirOutput);
board->PFI_Output_Select_1.writePFI1_Output_Select (tMSeries::tPFI_Output_Select_1::kPFI1_Output_SelectAI_Convert); // 0x03
Method 2:
// Set PFI0, PFI1 for output
board->IO_Bidirection_Pin.writeRegister (0x0003);
// set binary 0 00000 00011 00010 pattern
board->PFI_Output_Select_1.writeRegister (0x0062);
Both methods produce the same results. We see what appears to be the Convert Clock only and it's not on the expected PFI. The other output looks nothing like the Sample Clock. Where did we go wrong?
Thanks,
Gord
06-12-2006 04:02 PM
Hi Gord-
My mistake; ai/SampleClock should actually be referred to by 0x8 (AI_Start_Pulse). Otherwise your code looks good. You should expect to see a very low duty cycle ai/SampleClock and a very high duty cycle ai/ConvertClock. Which pins do you actually see ai/ConvertClock on?
Thanks-
06-15-2006 12:36 PM
06-16-2006 11:10 AM
06-19-2006 11:48 AM
Tom,
Thanks for the aiex2.cpp sample code.
In the interest of removing QNX from the equation, I thought I would compile and run aiex2.cpp under WinXP. The msvc60 build won't work - it's looking for header file visa.h and the file is no where to be found in the ddk's that I have downloaded. Where do I get this from?
What is the waveform and voltage levels that we should be seeing on the Sample and Convert clock signals? Seeing the signals on a scope is not as straight forward as would be expected.
Thanks,
Gord