08-30-2012 12:51 PM
Here's the final version that works correctly.
1) Send carriage return to initiate
2) Wait, then send "ST" to begin automatic logging
3) Check the read buffer once per second. If there is data, read the whole line and append to array.
4) If while loop is stopped, send "SP" to stop the instrument, then clean up.
Now I just need to take care of parsing the data, graphing, saving for later, etc.
Thanks everyone for your help, I appreciate it!
08-30-2012 01:00 PM - edited 08-30-2012 01:02 PM
Something that might help you is this little VI I put together really quick. It appends the carriage return to the string, sends the command, and then waits. It will help quite a bit in cleaning up your code.
08-30-2012 01:03 PM
You can also configure the port to add the CR automatically.
08-30-2012 01:19 PM
@Wayne.C wrote:
You can also configure the port to add the CR automatically.
I'll have to remember that one. But it only seems like it will work if the Termination Character was enabled and the Read either has the same termination character or is not using the termination character. You can manipulate all of these with a property node.
08-30-2012 01:43 PM
You are correct crossrulz. Has to be a situation where both the send/rcv term characters are the same. I run into that situation every now and then.