From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-08-2007 05:57 PM
08-09-2007 03:16 PM
Hi,
Currently there is no equivalent call in DAQmx to get the base address like the function used in Traditional DAQ. You were correct in using the VISA functions to get the base address, however it should work with DAQmx and not block usage. Which E-Series board are you using, and which version of LabWindows/CVI do you have?
Alex A.
08-13-2007 07:34 AM
Hi Alex,
I'm using CVI 8.1.1, VISA 4.1 and NI-DAQmx 8.5.0f5 .
When the PCI-6034E is installed without the VISA driver, it appears in MAX explorer under NI-DAQmx devices as "Dev1". When the VISA driver is installed for the PCI-6034E, the "Dev1" entry still appears but it is shown with a small red x, the icon is greyed out, and it is not possible to run self-test or test panels. The PCI-6034E then shows up under "PXI System" as PXI::4::2::INSTR.
Based on the red x and greyed out icon, I made the assumption that the DAQmx "Dev1" designation is not available when the VISA driver is installed.
I have very limited experience with VISA and have always used the "DevX" name assigned by NI-DAQmx for DAQmx function calls, so maybe I'm just missing something basic about using VISA devices in DAQmx function calls.
08-13-2007 07:59 AM
08-13-2007 01:44 PM
The problem persists.
When I boot the computer Device Manager shows the PCI-6034E llisted under "Data Acquisition Devices" and no VISA devices are shown. MAX shows it as a NI-DAQmx device and a VISA device (presumeably from earlier usage), but my program does not find the VISA device.
I use the VISA Driver Wizard to install the VISA driver for the device. Then it shows in Device Manager as a VISA device and is NOT shown as a National Instruments device. MAX shows it listed under "NI-VISA PXI Devices" device but shows the listing under "Data Acquisition Devices" ("Dev1") with the red x and the icon greyed out. My program then finds the VISA device but DAQmx functions report errors "Device not found".
Perhaps there is something wrong with the VISA driver that I created using the wizard. This is my first attempt at a VISA driver. I did not identify any interrupts and may have overlooked other potential requirements.
Here is a listing of the VISA ini file:
;=============================================================================
;
; This PXI Module Description File contains information a VISA implementation
; needs in order to access your PCI-6034E instrument.
;
;=============================================================================
[Module]
ModuleName = "PCI-6034E"
ModuleVendor = "National Instruments"
ModelCode = 0x2CA0
ManufCode = 0x1093
VISARegistration = Simple
And here is a listing of the functional portion of the inf file
[Version]
Signature=$WINDOWS NT$
Class=visaPxiDevice
ClassGUID={E1590550-9B9C-11d3-A250-0040055732CC}
Provider=%Vendor0%
DriverVer=08/13/2007,1.0
CatalogFile=PCI6034E.cat
;===========================================================================
; Default Installer
;===========================================================================
[DefaultInstall]
CopyINF=PCI6034E.inf
[DestinationDirs]
[SourceDisksNames]
[SourceDisksFiles]
;===========================================================================
; Class Installer
;===========================================================================
[ClassInstall32]
AddReg=AddClass_AddReg
[AddClass_AddReg]
HKR,,,0,%DeviceClassString%
HKR,,Icon,,"-5"
;===========================================================================
[ControlFlags]
ExcludeFromSelect=PCI\VEN_1093&DEV_2CA0&SUBSYS_00000000&REV_00
;===========================================================================
[Manufacturer]
%Vendor1%=PCIList,NTamd64
;===========================================================================
; PCI Plug and Play Devices
;===========================================================================
[PCIList]
%PCI6034E.DeviceDesc%=PCI6034E_Inst,PCI\VEN_1093&DEV_2CA0
%PCI6034E.DeviceDescN%=PCI6034E_Inst,PCI\VEN_1093&DEV_2CA0&SUBSYS_00000000&REV_00
[PCIList.NTamd64]
%PCI6034E.DeviceDesc%=PCI6034E_Inst,PCI\VEN_1093&DEV_2CA0
%PCI6034E.DeviceDescN%=PCI6034E_Inst,PCI\VEN_1093&DEV_2CA0&SUBSYS_00000000&REV_00
;===========================================================================
[PCI6034E_Inst]
AddReg=PCI6034E_AddReg
[PCI6034E_Inst.Services]
AddService=NiViPciKw, 0x00000002, NiViPciKw_AddService
[PCI6034E_AddReg]
HKR,,DeviceClass,1,72,65,73,75
HKLM,"SOFTWARE\National Instruments\Common\NI-PAL Database\NI-VXI\PCI\10932CA0","HowToSquelch",0,""
HKLM,"SOFTWARE\National Instruments\Common\NI-PAL Database\NI-VXI\PCI\10932CA0","EmergencyDisarm",0,""
HKLM,"SOFTWARE\National Instruments\Common\NI-PAL Database\NI-VXI\PCI\10932CA0","numIsThisMineEntries",0x00010001,0
HKLM,"SOFTWARE\National Instruments\Common\NI-PAL Database\NI-VXI\PCI\10932CA0","ManufName",0,"National Instruments"
HKLM,"SOFTWARE\National Instruments\Common\NI-PAL Database\NI-VXI\PCI\10932CA0","ModelName",0,"PCI-6034E"
;===========================================================================
[NiViPciKw_AddService]
DisplayName = %NiViPciKw.SvcDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\NiViPciKw.sys
;===========================================================================
[Strings]
; *******Localizable Strings*******
Vendor0="National Instruments"
Vendor1="National Instruments"
PCI6034E.DeviceDesc="PCI-6034E"
PCI6034E.DeviceDescN="PCI-6034E"
DeviceClassString="NI-VISA PXI Devices"
NiViPciKw.SvcDesc="NI-VISA PXI/PCI WDM Driver"
; *******Non Localizable Strings*******
SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4
SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3
08-14-2007 04:41 PM
You'll need to reinstall the card using the Add Hardware wizard of the OS in order for it to work with the DAQmx. You should not need to use the VISA wizard for it to work in MAX.
Alex A.
08-17-2007 10:51 AM
08-20-2007 12:57 PM
Hi Jeremiah and Alex,
Thanks much for your help. With your help I have found a workable solution to my problem.
I expected VISA to be able to find the PCI card using viFindRsrc() and when it failed, I stopped trying VISA assuming something basic was wrong. Only after using the VISA driver wizard would viFindRsrc() find the PCI card and then DAQmx would not work.
To solve the problem, I used DAQmxGetDeviceAttribute() to find the DAQmx_Dev_PCI_BusNum and DAQmx_Dev_PCI_DevNum and then constructed the name string "PXI4::2::INSTR" using the returned attributes for the 4 and 2. Using this instrument description, VISA opens the instrument (with the DAQmx driver installed) and will return the attribute VI_ATTR_PXI_MEM_BASE_BAR1 which I can then use as the address argument to WriteToPhysicalMemoryEx and ReadFromPhysicalMemoryEx (adding 2 to bar1base) to communicate with the card registers similar to our legacy code. I know I could continue to use VISA to access the registers, but this seems to work well.
I am very interested to know if you consider this to be brittle code or if you have suggestions for improving the code. I would prefer to use a DAQmx call to find the bar1base address and will ask NI to consider adding this attribute to the DAQmxGetDeviceAttribute() function. Of course I would prefer to not use register level programming at all, but this is not a practical choice in this case.
Thanks, crevicedweller
09-17-2007 07:18 PM
09-26-2007 11:34 PM