yo
This commit is contained in:
50
motor/build/POUS.h
Normal file
50
motor/build/POUS.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "beremiz.h"
|
||||
#ifndef __POUS_H
|
||||
#define __POUS_H
|
||||
|
||||
#include "accessor.h"
|
||||
#include "iec_std_lib.h"
|
||||
|
||||
__DECLARE_ENUMERATED_TYPE(LOGLEVEL,
|
||||
LOGLEVEL__CRITICAL,
|
||||
LOGLEVEL__WARNING,
|
||||
LOGLEVEL__INFO,
|
||||
LOGLEVEL__DEBUG
|
||||
)
|
||||
// FUNCTION_BLOCK LOGGER
|
||||
// Data part
|
||||
typedef struct {
|
||||
// FB Interface - IN, OUT, IN_OUT variables
|
||||
__DECLARE_VAR(BOOL,EN)
|
||||
__DECLARE_VAR(BOOL,ENO)
|
||||
__DECLARE_VAR(BOOL,TRIG)
|
||||
__DECLARE_VAR(STRING,MSG)
|
||||
__DECLARE_VAR(LOGLEVEL,LEVEL)
|
||||
|
||||
// FB private variables - TEMP, private and located variables
|
||||
__DECLARE_VAR(BOOL,TRIG0)
|
||||
|
||||
} LOGGER;
|
||||
|
||||
void LOGGER_init__(LOGGER *data__, BOOL retain);
|
||||
// Code part
|
||||
void LOGGER_body__(LOGGER *data__);
|
||||
// PROGRAM MOTOR
|
||||
// Data part
|
||||
typedef struct {
|
||||
// PROGRAM Interface - IN, OUT, IN_OUT variables
|
||||
|
||||
// PROGRAM private variables - TEMP, private and located variables
|
||||
__DECLARE_VAR(BOOL,START)
|
||||
__DECLARE_VAR(BOOL,STOP)
|
||||
__DECLARE_VAR(TIME,DELAY)
|
||||
__DECLARE_VAR(BOOL,RUNNING)
|
||||
RS RS0;
|
||||
TON TON0;
|
||||
|
||||
} MOTOR;
|
||||
|
||||
void MOTOR_init__(MOTOR *data__, BOOL retain);
|
||||
// Code part
|
||||
void MOTOR_body__(MOTOR *data__);
|
||||
#endif //__POUS_H
|
||||
Reference in New Issue
Block a user