02-14-2008 02:24 PM
Hi Tom
I fingered it out from a couple of code comments that I had to change a parameter in the AIPersonalize routine for a 6221 card and I am now reading data. Yay!
I still need to figure out how to compile and link "chipobjects", dma and rdhddk_rtx code in a Visual Studios Net 2003 project so that I can utilize these functions in my 6221 driver running under RTX and a proprietary API. Any tips or advice would be appreciated.
02-15-2008 11:23 AM - edited 02-15-2008 11:24 AM
Hi Floyd-
The biggest thing you would need would be to define all of the virtual paths for the various source and include files. You might also need to add preprocessor #defines for a couple of things, notably kLittleEndian or kBigEndian. All of these settings can be made in the Visual Studio project properties window (right-click on the project name in project explorer).
I don't have an RTX environment up to test on, so I just built a project for Windows (using NI VISA) and got it compiling. You should be able to use most of the settings here to help get your RTX build working. I just noticed that you're using VS2003 and I created mine in VS2005, so you might want to download one of the "free" Visual Studio 2005 express editions to view this.
My project was created with all files residing in C:\mhddk. The additional include directory setings and preprocessor defines are made as shown here:
\
Since you're using the entirely source-based RTX O/S interface from the MHDDK you shouldn't need to include any additional libraries for the linker. FYI, I had to include visa32.lib for mine because I was using NI-VISA for Windows.
02-21-2008 12:23 PM
02-21-2008 04:47 PM
Hi Floyd-
tMSeries.h defines some helpful enums (that we chose, for some reason, to not use in that example ), for example tPFI0_Output_Select() which defines PFI_DO as 0x10. The format of the PFI_Output_Select_1 register is as follows:
bits 0-4: PFI0 select
bits 5-9: PFI1 select
bits 10-14: PFI2 select
bit 15: reserved
with the same pattern repeating for PFI_Output_Select_N where N is a number between 1 and 5 and the PFI bitfields increase with the same pattern as PFI_Output_Select_1. PFI_Output_Select_6 contains the selection for PFI15 in bits 0-4 and the rest of the bitfields are reserved.
The values written to those registers by dioex2 correspond to setting the lowest PFIn lines to PFI_DO (i.e. output) and the upper PFIn lines to "default" (i.e. input). The setting for IO_Bidirection_Pin sets the PFI lines to input or output where bits 15-0 correspond to PFI15-PFI0, respectively. As you might guess, a value of '1' corresponds to output and a value of '0' corresponds to input.
05-26-2010 09:14 AM
Hello Tom,
I am solving a similar issue here. When I was trying to perform "make" I have received an error saying, that it can not open the file "visa.h". I really don't have this file, when I check win-visa.mak -> path "C:/VXIPNP/WinNT/include". Can you give me any advice, how could I create this dir structure or any other solution?
Thank you in advance for your reply.
Rasto
05-27-2010 04:18 PM
Hi Rasto,
Depending on the development support selections you made when you installed NI-VISA, "visa.h" and "visa.lib" may be in a couple of places. A couple of common locations are as follows:
For visa.h:
C:\Program Files\National Instruments\Shared\CVI\include\visa.h
C:\Program Files\IVI Foundation\VISA\WinNT\include\visa.h
For visa.lib
C:\Program Files\National Instruments\Shared\CVI\bin\msvc
C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc
You could also run a search on your harddrive for the file. Then you can copy it and any dependencies to whatever directory you desire.
John M
05-28-2010 02:21 AM
Hello John,
thank you very much for your reply. I have found all the needed files in path proposed by you and changed it in "win-visa.mak". After that, compiling was running well. Then there were some changes in "ai.h" to configure measurement and everything is running well.
Thank you once again,
Rasto
05-31-2010 11:26 AM