12-05-2006 06:01 AM
12-06-2006
01:19 PM
- last edited on
02-16-2024
04:59 PM
by
migration-bot
Hello Pranav,
For this type of application, the devices to consider are the PCI/PXI-654x, PCI/PXI-655x, or PCI Express 653x devices. All of these devices can acquire from over 13 digital lines using an external sample clock of speeds much greater than 100kHz. The hard part comes from arranging these samples in memory according to their value, and whether to use onboard memory or directly acquire to system memory(RAM). The NI-654x and NI-655x are PCI or PXI device that come in three varieties with either 1, 8, or 64 Mb/channel of onboard memory, but based on my calculations, even the largest memory option will not hold enough data for an hour-long acquisition at 100kS/s. For example, acquiring at 100,000 bits per second for 1 hour (60sec*60min) = 360Mb/channel of onboard memory required. Based on this limitation, I would recommend using the PCI Express 653x device. The PCI Express technology used by this device alleviates the need for onboard memory and allows the device to stream the acquired data directly into system memory(RAM). However, there is no way that I know of arranging these samples in system memory according to their value as they are acquired. Instead, I would recommend rearranging the samples post-acquisition in your application, in addition to any further processing that you require.
I hope this information helps and let us know if you have any further questions.
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
12-06-2006 01:40 PM
What is the nature of this "specific location within 256 MB memory, according to the value of the bits?" Would this be a binning operation, where you want to count the # occurrences of every possible 26-bit pattern? It kinda sounds like it because 2^26 is about 64 million values, and 256 MB lets you store a 4-byte (32-bit) count for the # occurrences of each pattern.
I'd think that if your XP PC can't handle the processing on the fly, you might want to stream to disk rather than to RAM. You're looking for a rate of about 400 kB/sec. If you're only binning, I'd think you might be able to count on the fly. If processing is more complex, you should certainly be able to stream to disk at that rate.
I'd think you might be able to consider a PCI-express version of the M-series 6259 board, which gives you 32-bits of hw-timed DIO along with additional static DIO, analog IO, and 2 counters. It probably won't have as much onboard memory, but it appears that no board has enough to avoid the need to transfer data to system RAM. The 6259 would give you much more variety for future apps, and it's even cheaper out of the box -- what's not to like?
-Kevin P.
12-07-2006 01:15 AM
12-07-2006 09:52 AM
12-08-2006
12:23 PM
- last edited on
02-16-2024
05:00 PM
by
migration-bot
Hello Kevin and Pranav,
Those are some great suggestions by Kevin for how to properly set up this type of application. To reinforce what Kevin said, all DAQ devices will use DMA transfers by default and have multiple DMA channels to transfer acquired data to system memory rather than interrupts. With the device having a direct DMA channel to system memory, no data should ever be overwritten on the onboard memory, especially at rates of 100kHz. If data is ever overwritten in the memory onboard the device before it can be transferred to system memory, the driver will throw an error indicating that a onboard memory buffer overflow occurred. What especially helps to avoid these onboard memory buffer overflows is using a PCI Express device like the PCIe M Series device Kevin suggested or the PCIe-653x devices, as the PCI Express bus gives the device a much wider dedicated pipe to pump data into system memory with DMA. Because of this 'double buffered' type of acquisition (buffer in onboard memory on the device and buffer in system RAM), you don't need a device with a full 256MB of onboard memory to hold all samples from the finite acquisition of 256MB worth of data. However, just for further reference, the only devices with 256MB of memory actually onboard the device are the high-memory option of the NI-654x Digital Waveform Generators/Analyzers, and this memory is devided up into 8MB/channel segments.
The next bottleneck to consider is actually reading the data out of system memory into your LabVIEW program (are you using LabVIEW?). This is where system dependancy and system memory allocation becomes a factor. Using the producer/consumer architecture in your program that Kevin suggested is the best way to have your read-from-buffer operations separated from your data processing and File I/O operations, and attach priorities to each operation. In addition, you may want to look into the LabVIEW Real-Time development environment, although I'm not sure that this is really required. This development tool will allow you to create your program on a development machine and deploy it to a system running a non-Windows Real-Time operating system. This allows the code to run in the kernel mode as you indicated, gives you more power to control execution priorities, and avoids a lot of the jitter and system dependencies involved with running your code on a Windows system.
I hope this information helps,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
12-12-2006 06:05 AM
01-19-2007 07:32 AM
Hello Kevin and Travis
I hope you will hear me once again. I did my 'home work' after getting valuable information from you during previous discussions. But still there are some hurdles.
Up to know I mainly focused on acquisition speed related problem that is, whether DAQ card will be able to do this task. However, after studying all recommanded cards( PCI-6533, 6534, PCIe- 6536, 6259), some other problems have arised apart from the above mentioned one. They are
1) Our ADCs need atleast one feedback signal(acknowledgement) from DAQ card after every read of data (26-bit), indicating that data is accepted. only after getting this signal, ADCs will accept another signal from detector. And this will rule out the use of 6259 in pattern generator mode which you probably recommanded. However, I feel that we may use LEVEL-ACK mode(what is your comment ?) after inserting small additional hardware circuit between card and ADC. Unfortunately, 6259 does not support any of 6 available handshaking modes including Level-ACK. So we have three alternates left, that is 6533, 6534, 6536.
2) The other problem is that our application needs the information about the deadtime along with total period of acquisition time(i.e realtime). The deadtime is the total time during which ADC remains blind for the incoming signal rate. This is due to some finite time required (could be order of few microsecond) by whole setup(ADC-DAQ CARD-Computer) between each read of data. For this, our ADCS provide a seperate digital output line called 'composite deadtime (cdt) at the output, which we used to gate(make ON) an onboard timer(8253) in our previous application( 256 * 256 resolution). Unfortunately, all 6533, 6534, 6536 doesn't have onboard timer and corresponding hardware input lines. I thought about software base internal timer, but it seems quite difficult as all 32-bit data are dumed in the memory using DMA without any processing. Again some additional hardware stuff may require !! I am thinking on it (possibly using 'change direction' feature on 32 DI/O lines). Any suggestion ?
3) In addition to above, our ADCs also want(so much demanding!!)one more digital line for START/STOP acquisition, at the begining and at the end of acquisition. As there is no seperate digital lines left, again it seems that some additional hard ware stuff plus 'change direction' feature might require once more (any new idea for this ?)
4) This is about the acquisition speed and all. I am still not clear!! Confused in selection between PCI-6534 and PCIe-6536. But before I say somthing more,I would like to make sure whether the data transfer process which I understand is the same as you suggested. And that is, a bunch of 32-bit data will be read and tranferred to computer memory(array) by DMA process. This array (I will call it A1)is different from the one which is the final one and having 256MB size (I will call it A2). A1 could be of any size but large is benificial. So DMA process is dumping 32-bit(actually 26) data, which is actually an address of a specific location in A2. So this is a producer function. Now, in between, application software read the 32-bit of data one by one and increase the value of content by one, at a location pointed by this address. This is a consumer function. (I am keen to know, which function would have a priority?)
Now problem is as follows. 6534 has 64MB onboard RAM and transfer rate is about 20MBps, where as e-6536 doesn't have RAM but transfer rate is 100MBps. (I hope these rates are correct). Now our application has maximum input rate is 100Khz * 4 byte(32-bit) = 400KBps. So compared to 6534, e-6536's producer function will engage the array A1 for a smaller period of time while dumping the data in to it. However, at the other hand, if PCI bus is not free for DMA transfer, e-6536 will have to wait untill it becomes avilable. whereas 6534 may probably store in its onboard RAM and will be ready for the next acceptence/transfer of data. So which is the better choice, 6534 or e-6536 ? or simply 6533 (no onboard memory, 5MBps rate and cheap!!)
Thanks and warm wishes
Pranav
01-22-2007
03:22 PM
- last edited on
02-16-2024
05:04 PM
by
migration-bot
Hello Pranav,
The more I learn about your application, the more I think that the Digital Waveform Generator/Analyzer devices we've discussed are probably not best for your application. Typically, these devices are used to generate or acquire hardware-timed digital waveforms for testing memory devices, image sensors, and display panels. Your application sounds more like trying to interface with and control a peripheral chip (26-bit ADC) with a customized messaging protocol. All of the NI-653x devices have some basic capabilities to interface with peripheral chips using the 8255 handshaking protocol. This protocol involves transferring data between the NI-653x devices and the peripheral digital chip by handshaking REQ and ACK lines, and may or may not use a clock signal. The details of this handshaking protocol are discussed in the following application note, and also in the help manuals for each device:
I would highly suggest studying the handshaking capabilities of these devices to see if they are compatible with your peripheral. However, if your peripheral chip requires a more complicated and customized handshaking protocol not directly supported by the NI-653x devices, I'm worried that you will run into the limitations of the NI-653x devices and not be able to successfully implement your application.
Another option that comes to mind is for you to implement your own digital circuit to interface with your peripheral chip. This can be done on an FPGA based device using the LabVIEW FPGA module. This involves developing FPGA code within LabVIEW that is then deployed and executed on an FPGA device like a National Instruments R-Series reconfigurable I/O device. Basically, this is like designing and developing your own customized digital communication chip to interface with your peripheral. However, the LabVIEW FPGA module's graphical programming environment makes this easier than it sounds. To get an idea of the capabilities of the LabVIEW FPGA module, take a look at the following tutorial:
Developing Digital Communication Interfaces with LabVIEW FPGA
I hope I haven't confused your choices even more, but based on your inital post, the task seemed easily accomplished with the NI-653x Digital Waveform Generator/Analyzer devices. However, after finding out all of the details of your communication protocol, the application does not seem so trivial.
Travis Gorkin
Applications Engineering
National Instruments
01-25-2007 07:10 AM
Dear Travis,
Thanks for the information about the FPGA based data acquisition. I am thinking on it, but simultaneously, I have restarted thinking about PCIe-6259 for our application, just to make the things simple and straight forward at this stage. I can look for FPGA based system if all the other alternates are closed. This is because FPGA system needs few other software modules like FPGA deployment etc which we do not have at present. At the same time, it will be slightly complex and may require more time to implement.
At present, I am trying to find out the best suitable DAQ card for our application and some how again I feel that PCIe-6259 may be useful. I have come to a conclusion about the possible logic (strategy) for acquiring the data using PCIe-6259 in the following way. I need your help to find out whether this strategy is feasible or not.
Three main tasks are to be performed in our application.
(1) Acquisition of data on high-speed 32 DIO
For this task, what I have planned is to use a ‘change detection’ feature on one of 32 DIO. One DIO line will be connected to ADC’s ‘READY’ signal, which indicates that data is available to read. I have gone through the user manual of PCIe-6259 and found that on either rising or falling edge of this signal a change detection event is generated which can be used as a “DI Sample Clock’ to acquire the data available on DIO lines. In addition, change detection event can be routed on one of the PFI lines. So eventually change detection should trigger another two events and that is generation of DI Sample clock and a pulse (or change of digital level) on one of PFI lines. Out of these two, DI sample clock will be used to read 26-bit data on D0-D25 and signal generated on PFI line will be used to reset the ADC. Resetting of ADC will make it (ADC) ready for the detection of another signal which comes from detector.
I need your opinion about this whether it is possible or not. That is, Can a single change detection event generate two other signals (DI sample clock and a pulse on PFI line)? Also I would like to know whether the change detection event will trigger ‘DI sample clock’ only once so that only ONE bunch of 32-bit data (actually 26-bit) will be read. What I mean to say that change detection event should not create a series of clock signal which read the data lines continuously and even if data is not available on it.
If this is possible, I will be able to acquire data even without handshaking.
(2) Controlling (making on/off) the onboard counter by external digital signal (called ‘CDT’) available from ADC.
As I mentioned earlier, I need to count dead-time during one acquisition period. For this a separate digital line called ‘cdt’ is available from ADC, which I would like to connect to gate of one of the counters available on PCIe-6259. I also need to read and clear this counter(through software) at some time during, at the beginning and at the end of the acquisition. I hope this is quite possible with PCIe-6259.
(3) Start and stop the acquisition (making ADC ON/OFF)
Our ADC needs one slow speed (static I/O) digital line which can be make ON and OFF. This is required to activate or deactivate the ADC in the beginning and at the end of the acquisition. PCIe-6259 has several PFI lines. From this lot; I would like to use one line in static I/O mode for above purpose.
For your easy reference, I have preapared a block diagram and line of actions of above explanation. Please see it in the next post (this is because I am not able to post it due to higher file size)
Thanks and regards
Pranav