Alex,
With regard to the simplified example, I use the constants, which are instrument handle constants, to ensure the shift registers (arrow boxes on either side of the while loop, passes data from output to input on each iteration) on the while loop have data. You should always try to ensure that the shift registers are wired to some known value, or they may take on the last value that was in them at a previous run time. The practice of not putting constants on shift registers has caught me and most others that write in LabView at one point or another, and it can be a bit frustrating to track down. So best practice is to ensure you know at every step of the way that the shift register is loaded with something, even if it's an empty constant.
They also helps to satisify the LabView rule that every tunnel out of the case structure must have data tied to it in every case. For the 7th case specifically I didn't want to pass the instrument handle from the input side of the case, because we closed it.
The semi-colons at the beginning of each SCPI command isn't really a requirement, but something I practice to force SCPI back to root, and its a "if it ain't broke don't fix it" kind of thing as well. You can "concatenate" SCPI commands together in the same level without re-typing the level, but I haven't had much success at this, but I also haven't messed with it that much. Its just as easy for me to type the full SCPI string as it is. For an example, if your previous command to the instrument was part of the SYS sub set, and the next command is also part of the SYS subset, technically you don't have to send the SYS part of the command set again. This is how I understand it is supposed to work, but I am not a SCPI expert.
As for what commands etc I send, I usualy only do what I need. I very rarely preset the instrument in my code for use here in the office, primarily because the engineers and myself will usually have the instrument setup into the state we want it, and we just use the code for capturing traces, or doing long term tests. For ATE systems that I send to our factories, I will preset the instrument, because I need it to start from a known state so that I can ensure the setup is correct. As a general rule of thumb I tend to do only what I need to do when talking to the instrument. The VISA inherent VIs handle all of the bus initialization via the property node, and general GPIB settings, so it isn't necessary for you to really do much, other than maybe change or establish the timeout as I did in case 1 of my example. Hope that makes sense.
As for your last post, the FORM REAL is telling the analyzer to format the data into binary data format of either a 32 bit or 64 bit form. Check page 184 of the programming manual for info there. They do this for speed, though generally taking traces isn't really all that speed critical, and honestly, I feel it takes more time on the PC side to disect the binary data back to useable numbers. I prefer to have the analyzer send it as FORM ASC which sends the data back as ASCII strings, which the VISA read directly outputs, the its just parsing a string to get the data you want, and most of the time, you can go directly to an array, as the data usually comes back as a comma separated values.
Finally, the command TRAC:DATA:Y? TRA is covered on page 250 of the programming manual, but when done as a query as I have, will return the Trace A Y axis points. Also as per the manual, the DATA and Y parts are optional. The string can be shortened to TRAC? TRA and will produce the same results. The formating of the data coming back is dictated by the FORM command we discussed before. They like to use the REAL format which returns the data in 32 or 64 bit blocks, but I prefer to just use the ASCII format, as the conversion at the PC is much simpler and I don't feel there is much of a time benifit in binary (PC memory is cheap as well, so its not as big of a deal to transfer as ASCII as it once was).
Sorry for the long post this time, lots of information on this one though. Hope that answers all the questions.
Troy