06-13-2007 04:45 PM
06-14-2007 10:04 PM
Hi Jeremy,
1) You can use either. From the LabVIEW Help on the String to Byte Array: Converts a string into an array of unsigned bytes. Each byte in the array has the ASCII value of the corresponding character in the string. So you can use any type of string and basically does what you also mentioned.
2) You can use the Number to Boolean Array (and vice versa) for this.
Stephanie
06-19-2007 02:26 PM
06-19-2007 03:08 PM
When you send anything between x00 and xFF to the VISA Write, that is exactly what is being sent - all 8 bits. If you create an indicator on the Write Buffer input, go to the block diagram, right click and select Hex Display, you will see the correct information. Normal Display (such as a default probe uses), will not show unprintable characters.
I'm not sure what you mean by two ports. If you are looping back tx of Com1 to rx of Com1, then you have a single port and it soounds like you've done the correct thing with your LabVIEW code. If you are using Com1 and Com2, then the VISA Write and the VISA Read would require different resource names. If you go into Hyperterminal with the loop back on, does it work there?
I'm a little confused about your description of the while loop. When you click the run button on the tool bar, the while loop will Start and you would normally Stop the while loop with a front panel control. Are you nesting a while loop inside a case statement and is the case statement nested inside an outer while loop? Posting an image or (even better), the code iteslf will help make things clearer.
Yes, you can optionally add an element to an array. One of the basic techniques to do this is to use a shift register and inside one of the cases, use the Build Array function to add the element. The other case just wires the shift register straight through. I would suggest you look at the shipping examples. One that has been around foresever is Fundamentals>Arrays and Clusters>Separate Array Values.
06-19-2007 06:10 PM