Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ M-seried 6230 Analog Output, AI_FIFO, AI_FIFO always returns 0x07FF , please help

Hi
What should be the difference in address space for BAR0 and BAR1 in board 6519?
 
When I run the driver program in debugger and look at the addreses for BAR0 and BAR1, the difference is 0x2000?? Is this correct?
 
for example, BAR0 = 0xc1400000, BAR1 = 0xc1402000
 
When I tested a different board (DAQ 6230) the BAR0 and BAR1 had only 0x1000 difference in address space?
 
We do not have any experience with this 6519 board, can you please provide some help in making the driver work for this board?
 
The driver code is for 6509 which has 11 ports and this driver code as it is does not work with our board 6519.
Please help
 
Thanks very much
Lee Khadii
Curtiss Wright
0 Kudos
Message 11 of 30
(6,865 Views)
Hi
Is there something I need to do with the DSUB connector to make the board work?
I am looking at the signal connection document and looks like you have to connect a external power suply???
 
What is this SInking and Soursing all about? 6519 is a Sinking device and I do not understand what we need to do for connection?
 
The connection Diagram shows pins 1,14 and 19 are connected to external power suplay???
How does this work?
 
The connection diagram shows pin 14 as GND but my 6519 diagram shows pin 14 is P2.6?
The connection diagram has pins 1(P0.0), 14(P2.6) and pin 19(OUT.COM) connected to external power supply and GND.
 
Can you please provide soem help?
Thanks very much
 
Lee Khadivi
Curtiss Wright
0 Kudos
Message 12 of 30
(6,859 Views)

Hello Lee,

Regarding your previous questions:

1) You are wondering how the example code knows that the board is not a 6509 so that it doesn't try to configure more ports than are present on the 6519.  Which example are you using?  Of those 5 examples downloaded from the MHDDK page for this board, all but 1 example configures only one port.  The 5th example configures 3 ports.  Are you using a different set of examples?  Based on these examples, you should be able to put together a simple example that writes to two ports and reads from two ports.

2) You are curious about the difference in the base addresses.  When I get my hands on a board, I can respond to this.

3) It sounds like you are unsure about how to physically connect this device.  If so, I recommend switching over to a Windows machine so you can install the NI-DAQmx driver (link below) in order to help you figure out the physical connections.  NI-DAQmx provides very simple tools like test panels that will allow you to test the functionality of your board and verify your signal connections before we try to develop your own driver.  At this point, we don't know if the problem is in your code or with your physical connections.  Using NI-DAQmx would allow you to focus on the physical connection part.  Once you understand that, then we can focus on your software.

NI-DAQmx 8.3.1

http://digital.ni.com/softlib.nsf/websearch/11D505B7B355EBD68625722D006A6B97?opendocument&node=13206...

Jeremy

0 Kudos
Message 13 of 30
(6,846 Views)

Hi Jeremy and thanks.

I will try the windows application and try to get the board working.

As for the 5 examples you mentioned, you are correct that 4 write to only 2 ports. The problem is that the code during initialization actually initializes 11 ports which means assumes 6509  board. I verified this with debugger doing single step. I am pretty sure my code is correct and I am not sure what impact the code has on 6519 board when it initializes 11 ports. Doing that obviously will be writing to memory locations beyong the 4 ports and who knows what happens when it does that.

I commented out the driver code for ports 4 thru 11 but then the program crashes. This may have to do with C++ classes that exists for all 11 ports.

Can you check into this and maybe talk to someone who worked or developed code for driver and maybe you can poit me to the right direction so I have a starting point to get going and know where in code I need to focus and change? At this poit I don't really know where to start in DDHK code to make it work for 6519.

I am curious as how come the developers didn't put in a FLAG and initialize the board for the correct board that is running or some kind of switch statement to see what board they need to initialize. This would have been very easy checking the device ID.

Thanks and I will wait for your response.

Lee Khadivi

Curtiss Wright Embedded Control

0 Kudos
Message 14 of 30
(6,842 Views)

Lee,

I now understand the initialization code you are referring to is the _initialize function that is called in the constructor of the chip object (tstaticDIO.cpp).  Yes, this (and the reset function) does appear to address non-existent ports when used with the 6519.  The thing to keep in mind here is these functions are simply resetting the individual objects to a known value.  These objects are the soft copies of the actual registers on the board.  Resetting the soft copies has no effect if the corresponding registers do not exist on that particular board.  So, for these examples, it doesn't matter that we reset the soft copy of ports 4-11.  With that said, you should be able to yank out the references to the extra ports if you really want to.  These chip object files are auto generated, so I wouldn't necessarily recommend modifying them manually unless you had a good reason to do so. 

If you have the VxWorks OS layer working, you should have everything you need to get an example working.  I used VISA to communicate with the hardware on Windows, but the chip objects and examples are the same as you are using.  Without modifying tstaticDIO.cpp, I modified digex1.cpp to reference my particular board, commented out the line to configure the port direction (since that isn't necessary for these boards with unidirectional ports), and changed IOPort0Data.writeRegister to IOPort2Data.writeRegister to write to port 2.  That was enough to successfully toggle some digital lines on port 2.  I hope this helps.  Let me know if you have any specific questions.

0 Kudos
Message 15 of 30
(6,832 Views)
Hi Jeremy
I understand and thank you for good explanation. I liked that. I think you are right. The only thing I have not done to comment out the port2 direction for output which I will do in a minute and I think I can get this thing working.
 
One important question I have is this: Can you tell me how to connect the board with DSUB connector and the cable that we goty from you guys? I have the DSUP 37 pin connector and the right cable hooked up to the PCI-6519 board. I think that there are some power supply or something like that that I need to connect to the board thru DSUB also. Do I need a external power supply? How do I connect the external power supply?
 
What is IN.COM and OUT.COM used for? What connection do I need to do for IN.COm and OUT.COM?
 
I think one problem I had that things didn't work was that I did not have external power supply connection and did not have any thing connected to IN.COM and OUT.COM ither.
 
Can you tell me how you connected the board for wiring and external power supply using DAQmx?
 
I have installed DAQmx LAB View and tried to send all 1's to PORT 2 thru the Window LAB View software but did not get any voltage from pin 11 which is bit 0 of PORT2.
 
If you have a wiring diagram that shows how to wire the DSUB wiring with board that would be excellent.
I thank you in advance.
 
Hope all the bad inclement weather is gone. We even had some snow here in southern California yesterday.
 
Thanks again
 
Lee Khadivi
 
Curtiss Wright
0 Kudos
Message