08-30-2016 12:34 AM
Hi,
Please see the attached code for serial communication with a patient monitor; after getting help on the forums once before it works, but you wont able to run it without the monitor etc. Excuse the front panel its a mess:)
However I have pretty high spec'd laptop and it works ok enough, with a couple of second delay at the most, displaying on the screen, however the people using the software arent as lucky and it takes exponentially it would seem longer and longer to display. The realtime samples are coming through at 100Hz or one every 10msec.
I have read that I should only use serial communication calls sparingly, and yes the producer loop is taking about long to get the sample, but the consumer loop has too much to do it would appear (and yes I am writing two files to disk... well that is what was required).
I have some ideas, including writing to memory first and then disk, creating a single loop for data calculations (hoping to reduce calls to VIs, or even stopping display to the monitor but then hard to know what is going on...
Any help or guidance would be appreciated and yes I am self taught. NM3v2.vi is the main file, I have included the subvis but let me know if anything is missing.
Cheers
08-30-2016 12:35 AM
Extra files
08-30-2016 12:36 AM
Last one
08-30-2016 01:04 AM
Sorry, I can't seen anything that sticks out but overall, there are many "strange" and inefficient code constructs.
08-30-2016 08:05 AM
One other tip. When dealing with more than 2 files, zip them up and attach the zip file to your message. It is easier to download 1 zip file rather than 7 individual files spread over 3 messages.
08-31-2016 03:09 AM
Thanks for the feedback! Very much appreciated and yes I am guessing that the learning curve was such that when I went looking for answers and found something that worked I kept repeating it ( I do admit at the beginning I thought some of the ways "labview" did things didnt make a lot of sense, though now I see it was my interpretation that didnt make any sense lol ). I will go about the improvements in the next couple of weeks but might check back in, and yes no idea about the outer loop...
Cheers!