From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

write serial data directly to file

I am using DasyLab 9. I am reading a com port for serial data. if i issue the command to output a log of stored data from the RSMASTER when the program is not running I get all the data that is in the log. however, when I run the program and send the received strings to a global variable, a$1\r and log it to a file using a message module when the string changes I dont get all the data, there are one out of 10 lines missing. so I would like to output directly to a file or maybe there is a better way to set up the log so that i dont miss data while I am writing to the file.

0 Kudos
Message 1 of 3
(5,434 Views)

What is the time base of the module that feeds the Action module? That may determine the update rate -- it should be faster than you expect the data to change.

There's also a question of whether the RS232->string is always catching the string.

 

Rather than use String changed, you may want to use a timer function for the input to the Action, and write regularly. 

 

Is the string alphanumeric? If so, there aren't many choices for logging to a file. You can log strings via ODBC, but it has the same limitation of the Action module response time. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
Message 2 of 3
(5,422 Views)

Thanks CJ, the TTL Pulse Generator just before the action module that updates the Message Log and also copies the incomming string to a global$ that I am pointing to with an incrementing variable was set on DRIVER. I changed it to DASYLAB and even though I am copying on the change of the incomming string I am getting the whole log. as usual, you pointed me in the right direction.

0 Kudos
Message 3 of 3
(5,414 Views)