ERROR!

This web site requires Java Script.
You must enable Java Script on
your browser to navigate this site.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data Parser

A Data Parser is a very useful tool to capture data from third-party RS-232 peripherals that do not use the same data format as the Weeder Technologies' DAQ Modules. It does not matter the actual data format that they use, as long as it consists of standard ASCII characters. The Data Parser function can extract one or more sections of the data stream and send it to a Screen Object or Variable. The Multi-Drop Peripheral Interface is a member of the Stackable DAQ Module's series and is designed specifically for these third-party devices. It allows them to be connected to the same serial cable as the other DAQ Modules and appends a header character to their data stream which is needed by the Data Parser to identify them.

To create or edit an existing Data Parser, select "Data Parser" in the <Run-Loop> menu which will bring up the Data Parser List dialog box. The following is a summery of the options available in this dialog box:

Data Parser List Dialog Box:

Selection List: This is the list of current Data Parsers if any have been created. This field will be blank if you have not yet defined any Data Parsers for this project.

Modify:

New: Click on this button to add a new Data Parser to the project. This will bring up another dialog box which can be used to create the specific steps of the Data Parser. See "Data Parser Configuration" below for more details.

Edit: To use this option, a Data Parser must first be selected from the list at the left. Click on this button to edit the selected Data Parser. This will bring up another dialog box which can be used to edit the individual steps of the Data Parser. See "Data Parser Configuration" below for more details.

Delete: To use this option, a Data Parser must first be selected from the list at the left. Click on this button to delete the selected Data Parser from the project.

Copy: To use this option, a Data Parser must first be selected from the list at the left. Click on this button to copy the selected Data Parser and place it on the clipboard. This will then enable you to open another project and paste this Data Parser into it.

Paste: To use this option, a Data Parser must first be copied and placed on the clipboard. Click on this button to paste the current contents of the clipboard into the project.

Data Parser Configuration Dialog Box:

Header Character: Type in the header character which is being used by the Multi-Drop Peripheral Interface attached to the third-party peripheral. This will instruct ModCom to capture all data beginning with this header character and parse it using the rules defined in the Step List.

Step List: This box lists all of the individual character string extraction steps which make up the Data Parser. When a data stream beginning with the header character is received, the parsing steps will be executed from top to bottom. Use the modify buttons at the right to edit each step or to move it up or down in the execution order. Note, the header character will be removed from the data stream before these steps are executed.

Modify:

Add Step: Click on this button to add a new character string extraction step to the Data Parser.

Edit Step: To use this option, a step must first be selected from the "Step List" box on the left. Click on this button to edit the selected step. This will bring up another dialog box which can be used to edit the properties of that particular character string extraction step. See "Data Parser Step Properties" below for more details.

Delete Step: To use this option, a step must first be selected from the "Step List" box on the left. Click on this button to delete the selected step from the Data Parser.

Copy Step: To use this option, a step must first be selected from the "Step List" box on the left. Click on this button to copy the selected step and place it on the clipboard. This will then enable you to paste this step at multiple positions in the execution order, or to open another project and paste this step into it.

Paste Step: To use this option, a step must first be copied and placed on the clipboard. Click on this button to paste the current contents of the clipboard into the project. You can then use the "Move Up" and "Move Down" buttons to position the step appropriately.

Move Up: To use this option, a step must first be selected from the "Step List" box on the left. Click on this button to move the selected step one place up in the execution order.

Move Down: To use this option, a step must first be selected from the "Step List" box on the left. Click on this button to move the selected step one place down in the execution order.

Data Parser Step Properties:

Step Function:

A step function extracts a group of characters from the data stream beginning with the first character that was received and moving forward one character at a time. The extracted group of characters can then be sent to a Screen Object or Variable, or discarded altogether.

Read until Count: Choose this option to read and extract a specific number of characters from the data stream. When processing, if this number exceeds the remaining number of characters in the data stream, an error box will pop up.

Read until Delimiter: Choose this option to read and extract all characters until reaching a delimiter. The delimiter will be removed from both the data stream and the group of characters extracted. Note, the delimiter can be a character which can be typed on the keyboard, or a special character such as a Carriage Return, Line Feed, or Escape by using the decimal equivalent of the character enclosed in brackets [ ]. The delimiter is not limited to a single character, it can also be a number of characters in a row. When processing, if the delimiter can not be found in the remaining characters of the data stream, an error box will pop up.

Send the results to this object or variable: The extracted characters can be sent to a Screen Object or Variable by typing in the object's ID label here. If wanting to discard the extracted characters, leave this box blank.

Carriage Return / Line Feed:

The nature of the ModCom communications routine automatically converts Carriage Return / Line Feed pairs to a single Carriage Return. So if wanting to use this pair of characters as your delimiter, use the Carriage Return by itself. A Line Feed character without a preceding Carriage Return will remain in the data stream. Also, multiple Carriage Returns in a row will always be converted to a single Carriage Return.

Last Data Parser Step:

When using a Data Parser, it is important to process the entire data stream before exiting. If not, the extra characters not processed will remain in the COM buffer and ModCom will think that they came from another DAQ card. Always read and extract all characters even if they are not being used elsewhere. This can usually be accomplished by setting the last Data Parser Step to read until reaching the ending delimiter used in the data stream.