08-20-2010 11:41 AM
In DASYLAB using an RS232 input at a baud of 115,200 I can only get a sampling rate of about 10Hz before filling in the buffer. I dont want to use the buffer because the data needs to be real time. Is there a way to increase the sampling rate for the serial port in DASYLAB? I know that different devices (i.e from IOTech) have no problem sampling at higher data rates, however they do not use the serial port), I also know that the serial port itself is not the hold up because it is capable of much higher data rates and other programs have no problem streaming in the data.
Thanks in advance,
Chris
08-20-2010 11:53 AM
You're right... it's not the port, but it is DASYLab.
DASYLab only processing a single set of samples each time the module is called. That means that there is a real limitation to the maximum speed. At this time, we see 1 to 10 samples/second reliably, but not any faster.
The data parsing can also affect the update rate - if you use a search string, then the module has to work harder, and it further limits the module's processing speed.
Most serial devices are not designed to be high speed. Those that are high speed, usually have drivers to communicate with them.
Data acquisition devices, such as NI DAQ devices, Measurement Computing or IOtech devices, all use drivers to handle the expected sampling rates. The devices and the software drivers have buffering, as does DASYLab, to ensure that the software can keep up with the hardware clocks.
08-20-2010 12:39 PM
This should be a limitation of the processing power of the computer. Are you telling me that there is absolutely no way to increase the speed of parsing string data via the serial port in DASYLAB? This is not the answer I want, perhaps the only solution is to write my own drivers and feed that into DASYLAB?
08-20-2010 12:46 PM
The only way to improve the speed of the serial port would be to completely rewrite the module. There hasn't been any demand for that. Typically higher speed devices have drivers rather than use the generic RS232 module.
08-22-2010 09:22 AM
"... perhaps the only solution is to write my own drivers and feed that into DASYLAB? ..." - You can use the DASYLab Extension Toolkit for this job. This Toolkit allow to write your own C/C++ driver module for your COMx application. You can generate into the sources with start from module a standalone thread with included COMx algorithm and a sleep 1 msec in the area from a while loop. So you get a maximum speed to read out the COMx results = time for COMx algorithm + sleep 1 msec time to share the power with other processes. With semaphore and synchronized variables you can put out the results with the Extension Toolkit module.
Best regards,
MHa