LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error writing txt to file

Hi!

I am trying to collect a number of touchpoints from a controller thorugh a SCB-68 and a Daqpad-6020E. There are about ten thousand touchpoints usually in three columns and for the first 1500 everything is okay and then suddenly a bunch random numbers start accompany the expected ones as can be seen in the attached txt file called ncrtg.log. Also, in the attached vi, I do not know how to end the while loop if a certain string comes up (closed) since the loop doesn't stop and I would need help with that. J1 and RTP is commands to the controller and with RTP the controller starts "sending" out the touchpoints.

Thank you

Navid

Message Edited by Navid on 06-27-2005 06:07 PM

Message Edited by Navid on 06-27-2005 06:08 PM

Download All
0 Kudos
Message 1 of 9
(3,503 Views)
Ok, first things first. The file does not contain random characters. If you look at the numbers that are there carefully you see that the real problem is that you are losing characters in transmission. As a result you sometimes have two lines that appear concatenated, and data missing from other lines. How much data is the instrument supposed to return each time you send the RTP command?

Second, concerning the VI you posted, the code you have should stop when the input string is "Closed" (note the capitalized C). Also you never close the file reference for the datafile you are creating.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(3,485 Views)
The maximum amount of data should not be more than 200KB and that might be taken it to far but just to be on the safe side.


Thank You

Navid
0 Kudos
Message 3 of 9
(3,471 Views)
Oh, by the way, the RTP command is only supposed to be sent once, I am not sure if that is the problem, tried to move the string constant with RTP to a sequence before but I am not sure if that is the correct thing to do to make it nly be sent once since it did not work.

Navid
0 Kudos
Message 4 of 9
(3,459 Views)
Based on what I got last night, your code isn't correct. I'll play with it a bit and send you back a cleaned-up version tonight if that's OK?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 9
(3,449 Views)
I appreciate all the help.

Thank You

Navid
0 Kudos
Message 6 of 9
(3,444 Views)
Mike, you bring back some nice C.S. Lewis memories with that signature (although it's been a while since I read those, I think I should again). Thanks.
Welcome back to the exchange.

___________________
Try to take over the world!
0 Kudos
Message 7 of 9
(3,438 Views)
Hi!

Managed to fix the problem, did not realize the fact that I was sending the RTP command all the time....


Thanks for the concern and effort


Navid
0 Kudos
Message 8 of 9
(3,432 Views)
Glad to hear you got things going. I'm still sending along the version I cam up with...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 9
(3,421 Views)