01-31-2007 02:10 PM
Hey Dennis,
Something must have been wrong with that computer, or some crucial element was missing cause I was able to run the executable on a different computer.
However as things normally go for me, one fixed problem leads to another.
When I run the executable I receive a 1073807339 timeout error during the scan procedure.
Attached is my subVI which deals with the write/read. It should be very familiar, you helped me with it not long ago and for some reason I'm getting a timeout error out of no where.
I would attach a screenshot of the error and where it happens but that would involve me switching computer set-ups, saving to disc, switching computer set-ups again, and then loading it up here. The error occurs between the read of 100 byte count, and the write of the \06 ack command.
Thanks,
01-31-2007 03:05 PM
02-01-2007 08:20 AM
I only have one set of instruments, that being the lone spectrophotometer. The different termination characters seems odd to me as well. Could that have something to do with the computer and/or operating system it is running on? Or just different serial ports (all with the same settings)?
At this current time I have three computers at my desk that I've been trying to get this executable to run on. The one computer that I created the entire VI on operates on Windows 2000, and the executable runs fine there. The other computer runs on Windows 2000 and the executable does nothing on this computer. The last computer runs on Windows NT and I was able to get the executable to store the baseline and begin the scan, but like I mentioned before the scan didn't complete and the executable kept running trying to read information that wasn't available due to the incomplete scan.
I added the line feed to the carriage return and nothing happened when I ran the executable.
Thank you for your continuous support and effort Dennis
02-05-2007 05:48 AM
02-05-2007 08:29 AM
Why I am almost certain none of these apply to me..
WIth all of this being said, the read/byte count seems to be the root of my errors.
Thanks
02-05-2007 04:14 PM
So many times, when I've had serial problems, it had to do with misinformation regarding the sending device and the expected number of bytes. When you hard code 100 bytes into Read, you'd better be sure that's the number. I've always had better luck with counting the bytes inside a loop, even when I know the expected bytes. This usually has to do with junk in the buffer, or bad documentation of the device - for example, some device manufacturers may not count CR and LF as characters. Sometimes, protocol is used such as addressing or checksums.
Also, as mentioned, \r and \r\n can get you, especially when combined with Use Termination Character during setup.
99 times out of 100, I've been able to diagnose my serial issues with the attached VI. It's not elegant, but it works for me. Go to the Diagram and setup the port for your device (9600, etc) before hitting Run. Good luck.
02-08-2007 02:44 PM
02-08-2007 02:49 PM
Steve, I'm glad you found it useful. I just noticed I have a new version which I didn't attach! It is now attached. A bit more friendly and cleaned up.
By the way, are you using Ocean Optics spectrometers? If so, I feel your pain.
02-08-2007 02:57 PM
02-08-2007 03:34 PM
Broken Arrow:
What's up with the Ocean Optics specrometers? Just asking because we have many of them here in use and I was one day considering writing LabVIEW code for them.
Thanks
-AK2DM