Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Register level programming on Mac OSX with NI-VISA / Labview

My goal is to control an experimental setup using a PCI-6503 digital I/O board using Labview 7.1 on Mac OSX 10.4.4, I do not need a precise timing and I would like to keep the wiring as is (this means: buying a new board or an USB DIO is not a good solution). NIDAQ-Base does not support the 6503 board on OSX.

What I did up to now:
* with NI-VISA Driver Wizard I could create a VISA device PXI0::20::INSTR and using "system profiler" I can see the board on the PCI bus
* I found the document "Using the VISA Driver Development Wizard and NI-VISA to Register-Level Program a PXI/PCI Device under Windows" http://zone.ni.com/devzone/conceptd.nsf/webmain/ADF3152837E2B4A486256B5600642AC7 and I tried to program more or less the same thing changing a few parameters based on the "register level programming" information in the PCI-6503 User manual. VISA Open works, using a property node I can read some information out of the board.
I used the following procedure:
VISA Out 8 to initialize the board: Adress space "11" (BAR0), offset 0xc0 value: BAR1_base & 0x80 (like in the manual).
"VISA Map Adress" with Adress space "12" (BAR1), base 0, size 0x1000
"VISA poke 8" offset 3, data 0x80 to setup all port to output
"VISA poke 8" offset 0, data 0x0 to set all outputs down -> no result
"Visa unmap" and "VISA Close" to end nicely.

What does not work:
- I cannot change the states of the ourput lines
- when I try to read from the board ports, the system crashes.

Attached is my test VI, any suggestion is welcome.
0 Kudos
Message 1 of 6
(8,745 Views)

I know this advice might be a bit pragramatical but my suggestion is to use a USB-6501 instead of the PCI-6503 as it will work with DAQmx Base 2.0. This is a low price solution. Spending even only one or two more hours in developing your own driver for the PCI-6503 will cost your company more money than purchasing this product.

Best regards,

Jochen Klier
National Instruments Germany

 
0 Kudos
Message 2 of 6
(8,724 Views)
Hi,

>> VISA Out 8 to initialize the board: Adress space "11" (BAR0), offset 0xc0 value: BAR1_base & 0x80 (like in the manual).

should be VISA Out 32 since it's a 32-bit register.

Diego

0 Kudos
Message 3 of 6
(8,706 Views)
That's right, it was really a simple mistake. Thank you a lot.
Everything works fine now.

0 Kudos
Message 4 of 6
(8,693 Views)
I'm a few steps down the learning curve from plosio so bear with me here. I'm trying to control a pair of PCI 6259 multifunction cards which live in a mac (G5, OS X 10.4.4) using the NI-VISA package and xcode. I have run the driver wizard, and put the inf file it created where the inf file said it wanted to go, and modified the find-resource example code so that the PCI macros get defined. Still the viFindRsrc function can't find my cards. I know they are there because mac's system profiler can see them. one thing that makes me nervous is that inf file lists WindowsNT for the operating system. Another thing that makes me nervous is that i was under the impression that the wizard was also supposed to make new VISA readable drivers (.kext files if i am not mistaken) for each card, and I don't see any new kernel extensions when I search the hard drive. Thanks in advance for any help.
0 Kudos
Message 5 of 6
(8,627 Views)
These cards seems to work with NI-DAQ, have a look here: http://www.ni.com/support/daq/versions_pci_pxi.htm
Or do you need some special feature that is not supported by NI-DAQ ?
0 Kudos
Message 6 of 6
(8,608 Views)