06-11-2015 02:11 PM
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.
06-12-2015 07:33 AM
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.
06-12-2015 02:11 PM
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.