12-06-2005 01:01 PM
12-06-2005 01:13 PM - edited 12-06-2005 01:13 PM
The following diagram will perform what you want. However, if using a special character, like $, for start or end, you must precede that character with a backslash. So put \$ instead of just $ for the start character. Special characters are $, *, .(period), \ (use \\), ^, and some others you could find by going to the help screen for Match Pattern. For your application, start char would be \$ and end char would be \n with the end char control set to display \Codes.
Message Edited by tbob on 12-06-2005 12:14 PM
Message Edited by tbob on 12-06-2005 12:16 PM
12-06-2005 02:57 PM
12-06-2005 03:17 PM
12-06-2005 03:34 PM - edited 12-06-2005 03:34 PM
Are you familiar with \codes? A new line is represented by \n. A carraige return is represented by \r. I think a line feed is \l. The Enter (Return) key is \n which is the same as carraige return and line feed (\n=\r\l). If you place the cursor in the End Char control and just press the Enter button, you will have the proper character in the control, but it is an unprintable character. Now if you right click on the control and select "\codes Display", you will see the display box change to \n. This is way to visibly see the new line character, or any special character like Tab, Space, etc...
Where does the error code come from? Error codes mean different things depending on who is generating the error.
Message Edited by tbob on 12-06-2005 02:36 PM
12-06-2005 06:21 PM
If you don't want to mess with having to decide whether or not you need to pre-pend a "\" to the character you are feeding into the match-pattern function then you could just do it all with byte arrays like in the attached example. The example also shows various ways that ASCII controls & indicators can be configured to allow you to more easily handle non-visible characters (just right-click on the front panel control/indicator and select normal, \ codes, hex or password).
As far as your question about the error code meaning, you can right-click on a front-panel error cluster and select the "explain error" option to see all the known causes of the error. You have to then interpret this in the context of what you were doing. When I drop an error cluster on a front panel, set status to Error and code to 85, I can right click on it, select "explain error" and get this:
"Error 85 occurred at an unidentified location
Possible reason(s):
LabVIEW: Scan failed."
...and that sounds to me like (as a WAG) you might be trying to use the Scan From String function with input data that does not match the format string.
12-07-2005 01:03 PM