08-06-2007 07:35 AM
08-06-2007 09:28 AM
08-06-2007 09:32 AM - edited 08-06-2007 09:32 AM
Message Edited by Gabi1 on 08-06-2007 04:33 PM
08-06-2007 10:57 AM
08-06-2007 11:40 AM
you mean you have 32 bits, 16 used for addressing external electronics, and 16 data?
generally, what i do is send a line of 32 bits, including all information already. i expect your program create a specific 16 bits data for a specific address. then just connec the two U16 inputs into one U32 (it is found in the data manipulation menu, and called "join numbers").
then if you want your output to be clocked, you have to prepare in advance the array of signals (vs time) you are going to send, ie all data to all addresses at all times. (to note: you can also use a queue that you fill faster than you output to card, but at first test create an array, then fill it to buffer, then start the DAQmx task).
send your vi, we can look at it.
08-07-2007 03:49 AM
08-07-2007 04:49 AM
08-07-2007 05:52 AM
your vi is pretty much empty.
looking trough your other posts on exactly the same subject (nou nou nou...), i see others have already give you quite a bit of advice how to set up your system.
before programming, i would propose you write exactly the specifications:
* what do you want to do: read and write at same time? at intervals? on the same lines? is there any synchronisation to do with external device?
* what kind of info is exactly read/written from the card? rate of transfer? is it a one time aquisiton for processing before read/write again, or is it a full timed pattern generation to your external device?
* you are talking about addresses: define the addresses to external devices, and info to be sent to each one. is there a time relation for addressing every different device.
*you cannot read and write from the same port at the same time. define requirements in time between write and read from external device.
once you have an idea what exactly you want to do, it will be much easier for you to define your problem in programming this. then also we can help more specifically. after that, begin by just experimenting piece by piece your system: hook up one line of your card to an oscilloscope, and create a small task just for this line. use the example i posted above, or any other example from NI, or even the express vi solution. now write a small pattern to this line: for example a square wave at 1MHZ, for about 100ms. to do so, define a clock rate of 1MHz, then send an array to the "buffer write" of the task, which would be filled of 1 and 0 alternatively for about 100K times (1MHz*100ms=100K elements). observe it on the scope to see how it goes. now you have done the first step! ![]()
one last note: please do not post same question multiple times. it is just annoying.
With that in mind, get to the task, and we can pass trough the next steps one by one ![]()
08-08-2007 10:00 AM
Thanks a lot. One quick question. Can NI PCI-6289 port 0 (32 digital lines) be used as both input and output? The reason I am asking this is because I would connect 16 data lines to it, and data lines should be able to Read and Write or in other words, to acquire and generate signal.
Or should I use NI PCI-6541 for data lines, and have address lines on the PCI-6289. Right now I have them connected data to 6289 and address to 6541, so I am thinking swapping them, if neccesary?
08-08-2007 12:36 PM