10-08-2012 01:11 AM
I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.
10-08-2012 01:54 AM
You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
10-08-2012 02:01 AM
You don't fully understand how data flow works. You have outputs from the VISA read which is wired to execute after the FOR loop completes fedding back into the FOR loop. You cannot do this as it is impossible to exeute. It is the equivilant of being in two places at the same time. Also, the inlut of a case statement cannot be an array. It must be a single value.
10-08-2012 06:58 AM
Also page attention to the format display of the string constants going into the VISA writes. In one you have "M3\r\nm". It seems odd to have another character after the \r\n which are typically termination characters in serial commands. But the big problem is that you have the constant set for normal display which means you are literally sending a backslash "r", backslash "n". \r \n are the codes for carriage return/line feed, but you need to enter those when the string constant is set for \codes display.
10-08-2012 07:04 AM
for the initial read \r\n is working well , only when reaches to case loop it is not well functioning, and also M3\r\nm the last character m is the character used to read the state od system, so we have to add it. so in that there is no problem . Only problem is that your answer is not clear to me. And also i mad the intention of my program clear.