AddWORD (FB) ¶ FUNCTION_BLOCK AddWORD EXTENDS CBM.ETrigA Adds a WORD value to the buffer. InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA Input wInput WORD The value to be added to the buffer. Output eError ERROR Error code of the call. Inout rCSVWriter CSVWriter Reference to the CSVWrtiter-FB
ETrigATemplate (FB) ¶ FUNCTION_BLOCK ETrigATemplate Template for the FBVisuGenerator. Don’t use this FB in your code. InOut: Scope Name Type Input xExecute BOOL xAbort BOOL Output eError ERROR xDone BOOL xBusy BOOL xError BOOL xAborted BOOL
Init (FB) ¶ FUNCTION_BLOCK Init EXTENDS CBM.ETrigA Initialize the CSVWriter InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA Input sDirectoryPath STRING The directory, where the file is saved, e.g. “C:directory” sFileName STRING The file name, e.g. “file.csv” sRowSeparator STRING ‘$R$N’ The row separator. Default: ‘$n’ sColumnSeparator STRING ‘;’ The column separator. Default: ‘;’ Output eError ERROR Inout rCSVWriter CSVWriter Reference to the CSVWriter-FB
NewFile (FB) ¶ FUNCTION_BLOCK NewFile EXTENDS CBM.ETrigA A new file is stored. If an empty string is given, a counter is added at the end of the filename, otherwise the file is named like the given value. <br><br> RESULT: The error Code OF TYPE ERROR InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA Input sNewFileName STRING The name for the new file. Empty string (‘’) will generate an automatic name Output eError ERROR Inout rCSVWriter CSVWriter Reference to the CSVWriter-FB
NewLine (FB) ¶ FUNCTION_BLOCK NewLine EXTENDS CBM.ETrigA Create a new line InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA eError ERROR Inout rCSVWriter CSVWriter Reference to the CSVWrtiter-FB
WriteFile (FB) ¶ FUNCTION_BLOCK WriteFile EXTENDS CBM.ETrigA Write the buffer as csv-file InOut: Scope Name Type Comment Inherited from Input xExecute BOOL Rising edge: Action starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values ( xDone , xError , iError ) are present at the outputs for exactly one cycle. ETrigA xAbort BOOL TRUE : Action is stopped immediately and all outputs are reset to their initial values. ETrigA Output xDone BOOL TRUE : Action successfully completed ETrigA xBusy BOOL TRUE : Function block active ETrigA xError BOOL TRUE : Error occurred, function block aborts action FALSE : No error ETrigA xAborted BOOL TRUE : Action aborted by user ETrigA eError ERROR Inout rCSVWriter CSVWriter Reference to the CSVWriter-FB
GlobalConstants ¶ Buffersize (ParamList)
Buffersize (PARAMS) ¶ InOut: Scope Name Type Initial Constant gc_BUFFERSIZE UDINT 5000 TIME_OUT ERROR ERROR.NO_ERROR
Objects ¶ Use this functionblocks for objectorrientated programming. CSVWriter (FunctionBlock) AddBOOL (Method) AddBYTE (Method) AddDATE (Method) AddDATE_AND_TIME (Method) AddDINT (Method) AddDWORD (Method) AddINT (Method) AddLINT (Method) AddLREAL (Method) AddLTIME (Method) AddLWORD (Method) AddREAL (Method) AddSINT (Method) AddSTRING (Method) AddTIME (Method) AddTIME_OF_DAY (Method) AddUDINT (Method) AddUINT (Method) AddULINT (Method) AddUSINT (Method) AddWORD (Method) GetFileSize (Method) InitSave (Method) NewFile (Method) NewLine (Method) Save (Method) SetSeparator (Method) ICSVObject (Interface) AddValue (Method) Save (Method)
CSVWriter (FB) ¶ FUNCTION_BLOCK CSVWriter InOut: Scope Name Type Initial Comment Input sFileName STRING ‘dataFileSeq.csv’ This name can be adapted sDirectoryPath STRING ‘C:/temp’ This path need to be adapted to an existing directory. Methods: AddBOOL AddBYTE AddDATE AddDATE_AND_TIME AddDINT AddDWORD AddINT AddLINT AddLREAL AddLTIME AddLWORD AddREAL AddSINT AddSTRING AddTIME AddTIME_OF_DAY AddUDINT AddUINT AddULINT AddUSINT AddWORD GetFileSize InitSave NewFile NewLine Save SetSeparator Structure: AddBOOL (Method) AddBYTE (Method) AddDATE (Method) AddDATE_AND_TIME (Method) AddDINT (Method) AddDWORD (Method) AddINT (Method) AddLINT (Method) AddLREAL (Method) AddLTIME (Method) AddLWORD (Method) AddREAL (Method) AddSINT (Method) AddSTRING (Method) AddTIME (Method) AddTIME_OF_DAY (Method) AddUDINT (Method) AddUINT (Method) AddULINT (Method) AddUSINT (Method) AddWORD (Method) GetFileSize (Method) InitSave (Method) NewFile (Method) NewLine (Method) Save (Method) SetSeparator (Method)