Resource documents - file writing services
Below are the main services for writing resources document files. Files are open using specific functions. When complete, they must be closed by calling the paFileClose function.
- Generating string tables:
paFileOpenWriteStringTable - Open a string
table document for writing
paFstbAddColumn - Define a column in the
string table
paFstbAddString - Add a string to a
table
- Generating analog signal:
paFileOpenWriteSignal - Open a signal
document for writing
paFSignalAddColumn - Define a column in
the signal resource
paFSignalAddPoint - Add a point to a
signal resource
FID := paFileOpenStringTable (NAME)
Parameters:
NAME : STRING; | Name of the string table (no suffix!) |
FID : DINT; | File identifier or 0 if fail |
Description:
This function opens a "string table" resource document file for writing. This functions removes the contents of the stringtable if it already exist. When written, the file must be closed by calling the paFileClose function.
OK := paFstbAddColumn (FID, NAME)
Parameters:
FID : DINT; | File identifier returned by the paFileOpenStringTable function |
COL : DINT; | Index of the column (0 based) |
NAME : STRING; | Name of the column |
OK : BOOL; | TRUE if successful |
Description:
This function adds a column to a "string table" resource. The index of the first column is 0. Column must be declared from the left to the right. Columns must be definied before adding strings to the table.
OK := paFstbAddString (FID, NAME, COL, VALUE)
Parameters:
FID : DINT; | File identifier returned by the paFileOpenStringTable function |
NAME : STRING; | Identifier of the string in the table |
COL : DINT; | Index of the column (0 based) |
VALUE : STRING; | Contents of the string |
OK : BOOL; | TRUE if successful |
Description:
This function adds a string to a "string table" resource. The corresponding column must be defined before calling this function.
FID := paFileOpenSignal (NAME)
Parameters:
NAME : STRING; | Name of the signal (no suffix!) |
FID : DINT; | File identifier or 0 if fail |
Description:
This function opens an "analog signal" resource document file for writing. This functions removes the contents of the resource if it already exist. When written, the file must be closed by calling the paFileClose function.
OK := paFSignalAddColumn (FID, NAME)
Parameters:
FID : DINT; | File identifier returned by the paFileOpenSignal function |
COL : DINT; | Index of the column (0 based) |
NAME : STRING; | Name of the column |
OK : BOOL; | TRUE if successful |
Description:
This function adds a column to an "analog signal" resource. The index of the first column is 0. Column must be declared from the left to the right. Columns must be definied before adding points are added to the signal.
OK := paFSignalAddPoint (FID, TM, COL, VALUE)
Parameters:
FID : DINT; | File identifier returned by the paFileOpenSignal function |
TM : TIME; | X coordinate (time) of the point |
COL : DINT; | Index of the column (0 based) |
VALUE : REAL; | Y coordinate of the point |
OK : BOOL; | TRUE if successful |
Description:
This function adds a point to an "analog signal" resource. The corresponding column must be defined before calling this function.