Command transmission

Here you can unpack the complete PLC sources: TcPlcLibIEC870_5_101Slave_TutorialSample.zip

 

Commands can be sent from the central station in control direction (to the substation). A single command with type ID 45 (C_SC_NA_1) is used for controlling an application object that is transferred in monitoring direction as a single-point information (M_SP_NA_1, M_SP_TA_1 or M_SP_TB_1). A dual command (C_DC_NA_1) is used for controlling an application object that is transferred in monitoring direction as a double-point information (M_DP_NA1, M_DP_TA_1 or M_DP_TB_1), etc.

 

Configuration of system parameters:

Configuration of application objects:

Examples:

Single command with the IOA = 10. The command value is mapped to memory area buffer, byte offset = 100, bit offset = 0.

F_iecInitAOEntry( C_SC_NA_1, 10, 0, 0, MAP_AREA_MEMORY, 100, 0, AODB[24] );

 

Double command with the IOA = 20. The command value is mapped to memory area buffer, byte offset = 200, bit offset = 0..1.

F_iecInitAOEntry( C_DC_NA_1, 20, 0, 0, MAP_AREA_MEMORY, 200, 0, AODB[27] );

 

Set point, scaled value with the  IOA = 60. The command value is mapped to memory area buffer, byte offset = 600..601, bit offset = 0.

F_iecInitAOEntry( C_SE_NB_1, 60, 0, 0, MAP_AREA_MEMORY, 600, 0, AODB[39] )