07-06-2007 07:33 PM
07-07-2007 07:01 PM - edited 07-07-2007 07:01 PM
Briefly looking at the code, I would expect unpredictable race conditions everywhere.
Your main VI has disconnected code segments all over the diagram, resetting certain values. There is no way to tell what happens first, e.g. will the indicator first get a value from inside the stacked sequence or get reset first with a code segment on the outside. Since you use indicators as controls and vice versa (e.g. timeout) it is very difficult to troubleshoot.
Your error handling is highly suspect: You start each frame of the stacked sequence with the same error value, and if an error occurs on one of the frames you just update a local variable without using the error information in subsequent frames.
Shouldn't there be a small delay in the "wait for..." subVI?
Sorry, I cannot troubleshoot your code because of missing subVIs and hardware. I also have a hard time with all these references, deeply stacked sequences, leaking dataflow, and right-to-left flowing wires.
Here are a few quick tips to simplify your math in you "data transform" subVI. If you would cast your string to a complex datatype (CSG), the code gets significantly simpler (basically, it goes from the size of an envelope to the size of a postage stamp without change in result! :)).
Have a look at the image below:

Another example is in frame #7. Here you keep every third element of a 1D array using a complicated while loop (mislabeled as: REMOVE EVERY THIRD ELEMENT FROM ARRAY). All you really need is a decimate array node. 🙂

Sorry, as mentioned, I cannot address your main problem, but I suspect it is directly caused by your coding style.
Message Edited by altenbach on 07-07-2007 05:02 PM
07-07-2007 10:16 PM
Thanks altenbach for your comments.
I have simplified this vi by removing all control references (used for troubleshooting purpose only). The problem is in the "anvna Fetch Trace.vi." Please refer to attached word document that shows the change that I need to make in order for second PC to work (256KB memory).
Basically I need to change the visa read buffer from 1000000 to 1420, which only gives me 174 point instead of 551 that I get in the first PC (1GB of memory)
Thanks again for your assistance on this issue.
Frank
07-08-2007 08:34 PM
07-08-2007 09:01 PM
07-08-2007 09:22 PM
You go into MAX, right click on the instrument and select 'Communicate with instrument'. You get a window with read/write/query tabs. Use the query tab and send the TRAC? 1 command just like it is in the driver and just like it is in your programming manual. If you want to experiment with the VIs, put an indicator on the return count and read buffer outputs of the VISA Read. Both the MAX window and the LabVIEW mods will tell you exactly what is read and how many bytes are read.
07-09-2007 08:14 PM
07-09-2007 08:32 PM
07-09-2007 08:51 PM
I selected the Raw socket option and entered the IP address 10.0.0.2 and automatically shows port 7, but it gives me an error "could not open a visa session to 'TCPIP:10.0.0.2:socket"
I am entering or selecting the right option? What about the port number? Thanks,
Frank
07-09-2007 09:17 PM