Bonjour,
Les derniers articles ont été consacrés à la mise en œuvre de la messagerie Hilscher dans « Ada for Automation » et un exemple autonome illustrant son utilisation pour gérer une communication PROFIBUS DP V1 Class 2 a été donné hier.
Pour terminer cette série, il nous restait à montrer l’intégration de cet exemple dans l’application exemple « App2 » déjà évoquée ici et là.
Nous disposons donc maintenant d’un exemple complet montrant d’une part la communication cyclique avec la mémoire image process, commune quelle que soit la pile de protocole à l’œuvre, et d’autre part la communication acyclique avec donc des messages transportant des commandes ou des indications échangés avec le système et les piles de protocoles, chaque interface étant documentée dans un manuel propre.
Cette application « App2 » étend le projet « A4A_HilscherX » et partage ainsi entre autres le cœur, soit la tâche « A4A.Kernel.Main ». On ne présentera de celui-ci que les évolutions.
Nous avons vu qu’il nous faut une instance de l’objet « A4A.Protocols.HilscherX.Channel_Messaging » par canal de communication.
Aussi cet instance est fournie par le paquetage « A4A.HilscherX » importé par « A4A.Kernel.Main » :
package A4A.HilscherX is
--------------------------------------------------------------------
-- Hilscher cifX Channel Messaging objects
--------------------------------------------------------------------
Board1_Channel0_Messaging : aliased
A4A.Protocols.HilscherX.Channel_Messaging.Instance;
end A4A.HilscherX;
On a donc dans « A4A.Kernel.Main » :
- l’import du paquetage qui déclare l’instance,
- après ouverture du canal, l’initialisation de l’instance,
- l’appel d’une nouvelle procédure déclarée au niveau application, « A4A.Application.Cold_Start », qui permet de procéder à des initialisations avant de rentrer dans la boucle principale,
- l’appel d’une nouvelle procédure déclarée au niveau application, « A4A.Application.Closing », qui permet de procéder à des dés-initialisations avant de sortir de la boucle principale,
- et termine l’instance dûment.
...
A4A.Log.Logger.Put (Who => My_Ident,
What => "Initialising Channel Messaging...");
A4A.HilscherX.Board1_Channel0_Messaging.Initialise
(Channel_Handle => Channel_Handle);
...
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Calling Cold_Start...");
A4A.Application.Cold_Start;
--------------------------------------------------------------------
-- Main loop
--------------------------------------------------------------------
Main_Loop:
loop
...
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Calling Closing...");
A4A.Application.Closing;
...
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Terminating Channel Messaging...");
A4A.HilscherX.Board1_Channel0_Messaging.Quit;
L’interface entre le programme utilisateur et le noyau est définie dans « A4A/src/a4a-application.ads » :
-- Ada for Automation --
-- --
-- Copyright (C) 2012-2014, Stephane LOS --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-----------------------------------------------------------------------
package A4A.Application is
--------------------------------------------------------------------
-- User Program
--------------------------------------------------------------------
procedure Cold_Start;
-- This procedure is called once during Main Task initialisation.
-- Its purpose is to provide for first time application initialisation.
procedure Closing;
-- This procedure is called once during Main Task termination.
-- It allows application to terminate cleanly.
procedure Main_Cyclic;
-- This is application main entry point.
-- It is called by Main Task when in Running state.
procedure Periodic_Run_1;
-- This is application entry point for the periodic task 1.
-- It is called by Periodic Task 1 when in Running state.
function Program_Fault return Boolean;
private
Program_Fault_Flag : Boolean := False;
-- It is raised by exception handling in application and tested by
-- Main Task.
end A4A.Application;
L’implémentation de ces fonctions est à la charge de l’utilisateur et pour notre programme exemple est réalisée dans « app2/src/a4a-application.adb » :
-- Ada for Automation --
-- --
-- Copyright (C) 2012-2014, Stephane LOS --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-----------------------------------------------------------------------
with Ada.Real_Time;
with Ada.Exceptions; use Ada.Exceptions;
with A4A.Log;
with A4A.Memory; use A4A.Memory;
with A4A.User_Functions; use A4A.User_Functions;
package body A4A.Application is
procedure Cold_Start is
begin
Initialise;
end Cold_Start;
procedure Closing is
begin
Close;
end Closing;
procedure Main_Cyclic is
My_Ident : String := "A4A.Application.Main_Cyclic";
begin
Map_Inputs;
Map_HMI_Inputs;
EH_Level;
PROFIBUS_DPM_DPV1C2;
Map_Outputs;
Map_HMI_Outputs;
exception
when Error: others =>
A4A.Log.Logger.Put (Who => My_Ident,
What => Exception_Information(Error));
Program_Fault_Flag := True;
end Main_Cyclic;
procedure Periodic_Run_1 is
My_Ident : String := "A4A.Application.Periodic_Run_1";
begin
null;
exception
when Error: others =>
A4A.Log.Logger.Put (Who => My_Ident,
What => Exception_Information(Error));
Program_Fault_Flag := True;
end Periodic_Run_1;
function Program_Fault return Boolean is
begin
return Program_Fault_Flag;
end Program_Fault;
end A4A.Application;
Cette application définit les objets nécessaires dans « app2/src/a4a-user_objects.ads » :
-- Ada for Automation --
-- --
-- Copyright (C) 2012-2014, Stephane LOS --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-----------------------------------------------------------------------
with A4A.Library.Timers.TON; use A4A.Library.Timers;
with A4A.Protocols.HilscherX.Profibus_DPM.DPV1;
with A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Initiate.FB;
with A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Abort_Req.FB;
with A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Read.FB;
with A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Closed.FB;
use A4A.Protocols.HilscherX.Profibus_DPM;
package A4A.User_Objects is
--------------------------------------------------------------------
-- User Objects creation
--------------------------------------------------------------------
Tempo_TON_1 : TON.Instance;
-- My Tempo TON 1
TON_1_Q : Boolean := False;
--------------------------------------------------------------------
-- Inputs from cifX PROFIBUS DPM
--------------------------------------------------------------------
LT_Main_Value : Float := 0.0;
LT_2nd_Value : Float := 0.0;
LT_Main_Status : Byte := 0;
LT_2nd_Status : Byte := 0;
--------------------------------------------------------------------
-- Outputs to cifX PROFIBUS DPM
--------------------------------------------------------------------
LT_Display_Value : Float := 0.0;
LT_Display_Status : Byte := 0;
--------------------------------------------------------------------
-- Test PROFIBUS DPM DP V1 Class 2
--------------------------------------------------------------------
DPV1_FB : DPV1.Instance;
Initiate_FB : DPV1C2.Initiate.FB.Instance;
Remote_Address : DWord := 2;
Do_Initiate : Boolean := False;
Initiate_Done : Boolean := False;
Initiate_Error : Boolean := False;
Initiate_Cnf_Pos_Data : DPV1C2.Initiate.PROFIBUS_FSPMM2_INITIATE_CNF_POS_T;
Abort_FB : DPV1C2.Abort_Req.FB.Instance;
Do_Abort : Boolean := False;
Abort_Done : Boolean := False;
Abort_Error : Boolean := False;
Abort_Cnf_Data : DPV1C2.Abort_Req.PROFIBUS_FSPMM2_ABORT_CNF_T;
Read_FB : DPV1C2.Read.FB.Instance;
-- Software revision from E+H Level Meter
Slot : DWord := 1;
Index : DWord := 73;
Length : DWord := 16;
Do_Read : Boolean := False;
Read_Done : Boolean := False;
Read_Error : Boolean := False;
Read_Cnf_Pos_Data : DPV1C2.Read.PROFIBUS_FSPMM2_READ_CNF_POS_T;
Software_Revision : String (1 .. 16);
DPV1C2_Closed_FB : aliased DPV1C2.Closed.FB.Instance;
Closed_Indication_Got : Boolean := False;
Closed_Indication_Data : DPV1C2.Closed.PROFIBUS_FSPMM2_CLOSED_IND_T;
type Block_Status is
(X00,
-- Initial
X01,
-- Initiate DPV1C2 connection
X02,
-- Read data from slave
X03,
-- Abort connection
X04,
-- Wait for Closed Indication
X05
-- Terminate
);
Status : Block_Status := X00;
end A4A.User_Objects;
Les fonctions utilisateurs sont spécifiées dans « app2/src/a4a-user_functions.ads » :
-- Ada for Automation --
-- --
-- Copyright (C) 2012-2014, Stephane LOS --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-----------------------------------------------------------------------
package A4A.User_Functions is
--------------------------------------------------------------------
-- User functions
--------------------------------------------------------------------
procedure Map_Inputs;
procedure Map_Outputs;
procedure Map_HMI_Inputs;
procedure Map_HMI_Outputs;
procedure Initialise;
procedure Close;
procedure PROFIBUS_DPM_DPV1C2;
procedure EH_Level;
end A4A.User_Functions;
Et elles sont implémentées dans « app2/src/a4a-user_functions.adb » :
-- Ada for Automation --
-- --
-- Copyright (C) 2012-2014, Stephane LOS --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-----------------------------------------------------------------------
with Ada.Real_Time;
with A4A.Memory; use A4A.Memory;
with A4A.Library.Conversion; use A4A.Library.Conversion;
with A4A.Log;
with A4A.HilscherX;
with A4A.User_Objects; use A4A.User_Objects;
package body A4A.User_Functions is
--------------------------------------------------------------------
-- User functions
--------------------------------------------------------------------
procedure Map_Inputs is
begin
null;
end Map_Inputs;
procedure Map_Outputs is
begin
null;
end Map_Outputs;
procedure Map_HMI_Inputs is
begin
null;
end Map_HMI_Inputs;
procedure Map_HMI_Outputs is
begin
Bytes_To_Word (LSB_Byte => Hilscher_cifx0_Inputs(1),
MSB_Byte => Hilscher_cifx0_Inputs(0),
Word_out => MBTCP_IOServer_Input_Registers(1));
Bytes_To_Word (LSB_Byte => Hilscher_cifx0_Inputs(3),
MSB_Byte => Hilscher_cifx0_Inputs(2),
Word_out => MBTCP_IOServer_Input_Registers(0));
Bytes_To_Word (LSB_Byte => Hilscher_cifx0_Inputs(4),
MSB_Byte => 0,
Word_out => MBTCP_IOServer_Input_Registers(2));
end Map_HMI_Outputs;
procedure Initialise is
begin
Initiate_FB.Initialise
(Channel_Access => A4A.HilscherX.Board1_Channel0_Messaging'Access);
Abort_FB.Initialise
(Channel_Access => A4A.HilscherX.Board1_Channel0_Messaging'Access);
Read_FB.Initialise
(Channel_Access => A4A.HilscherX.Board1_Channel0_Messaging'Access);
DPV1_FB.Initialise
(Channel_Access => A4A.HilscherX.Board1_Channel0_Messaging'Access,
DPV1C2_Closed_Access => DPV1C2_Closed_FB'Access);
end Initialise;
procedure Close is
begin
DPV1_FB.Quit;
--Wait for completion
loop
exit when DPV1_FB.Is_Terminated;
delay 1.0;
end loop;
end Close;
procedure PROFIBUS_DPM_DPV1C2 is
My_Ident : String := "PROFIBUS_DPM_DPV1C2";
begin
case Status is
when X00 => -- Initial state
if DPV1_FB.Is_Ready then
Status := X01;
end if;
when X01 => -- Initiating DPV1C2 connection
if Initiate_Done then
if Initiate_Error then
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Connection failed");
Status := X05;
else
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Connected");
Initiate_Cnf_Pos_Data := Initiate_FB.Get_Data_Pos;
Status := X02;
end if;
end if;
when X02 => -- Reading data from slave
if Read_Done then
if Read_Error then
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Read failed");
else
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Data Read");
Read_Cnf_Pos_Data := Read_FB.Get_Data_Pos;
for I in Software_Revision'Range loop
exit when Read_Cnf_Pos_Data.Data (I) = 0;
Software_Revision (I) :=
Character'Val (Read_Cnf_Pos_Data.Data (I));
end loop;
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Software Revision : " & Software_Revision);
end if;
Status := X03;
end if;
when X03 => -- Aborting connection
if Abort_Done then
if Abort_Error then
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Connection Abortion failed");
Status := X05;
else
A4A.Log.Logger.Put
(Who => My_Ident,
What => "Connection Aborted");
Abort_Cnf_Data := Abort_FB.Get_Data;
Status := X04;
end if;
end if;
when X04 => -- Waiting for Closed Indication
if Closed_Indication_Got then
Closed_Indication_Data := DPV1C2_Closed_FB.Get_Data;
if Closed_Indication_Data.CRef =
Initiate_Cnf_Pos_Data.Com_Ref then
DPV1C2_Closed_FB.Answer;
Status := X05;
end if;
end if;
when X05 => -- Terminating
null;
end case;
Do_Initiate := (Status = X01);
Initiate_FB.Cyclic
(Do_Command => Do_Initiate,
Remote_Address => Remote_Address,
Done => Initiate_Done,
Error => Initiate_Error);
Do_Read := (Status = X02);
Read_FB.Cyclic
(Do_Command => Do_Read,
Com_Ref => Initiate_Cnf_Pos_Data.Com_Ref,
Slot => Slot,
Index => Index,
Length => Length,
Done => Read_Done,
Error => Read_Error);
Do_Abort := (Status = X03);
Abort_FB.Cyclic
(Do_Command => Do_Abort,
Com_Ref => Initiate_Cnf_Pos_Data.Com_Ref,
Done => Abort_Done,
Error => Abort_Error);
DPV1C2_Closed_FB.Cyclic
(Got_Indication => Closed_Indication_Got);
end PROFIBUS_DPM_DPV1C2;
procedure EH_Level is
My_Ident : String := "EH_Level";
Word_0 : Word := 0;
Word_1 : Word := 0;
DWord_0 : DWord := 0;
Elapsed_TON_1 : Ada.Real_Time.Time_Span;
begin
Bytes_To_Word
(LSB_Byte => Hilscher_cifx0_Inputs(1),
MSB_Byte => Hilscher_cifx0_Inputs(0),
Word_out => Word_0);
Bytes_To_Word
(LSB_Byte => Hilscher_cifx0_Inputs(3),
MSB_Byte => Hilscher_cifx0_Inputs(2),
Word_out => Word_1);
Words_To_DWord
(LSW_Word => Word_1,
MSW_Word => Word_0,
DWord_out => DWord_0);
LT_Main_Value := DWord_To_Float (DWord_0);
Tempo_TON_1.Cyclic (Start => not TON_1_Q,
Preset => Ada.Real_Time.Milliseconds (10000),
Elapsed => Elapsed_TON_1,
Q => TON_1_Q);
if TON_1_Q then
A4A.Log.Logger.Put
(Who => My_Ident,
What => "LT_Main_Value = " & LT_Main_Value'Img & "%");
end if;
end EH_Level;
end A4A.User_Functions;
On remarquera particulèrement les procédures « Initialise » et « Close », appelées respectivement par les procédures « Cold_Start » et « Closing ».
Il n’y a plus de boucle comme dans l’exemple autonome car elle est implicite, c’est la boucle principale du noyau.
En fait, une partie de ce qui se trouve dans la procédure « EH_Level » pourrait figurer dans « Map_Inputs ». Il ne s’agit que d’un exemple et l’utilisateur a toute latitude pour organiser son code comme il l’entend.
La seule interface définie avec le noyau est celle spécifiée par « A4A.Application ». Au dessus, c’est ouvert. Et bien sûr, si cela ne convient pas, le code source est également ouvert ! 😉
Ci-dessous la trace correspondante :
2014-06-18 10:28:47.51 => A4A_Console_Main :
***********************************************
Application Identification
Name :
Hilscher cifX Test Application (app2)
Version :
2014/06/17
Description :
This is the test application 2.
The purpose of this application is to demonstrate the following capabilities :
* Command Line or Graphical User Interface,
* Modbus TCP Server to connect a SCADA system,
* Hilscher cifX binding,
* some of the functions and objects of the library.
It is supposed to be run in conjunction with a SCADA system and slave devices on a supported field bus system.
***********************************************
2014-06-18 10:28:47.51 => A4A.Kernel.Sig_Handler : Waiting Signal Interrupt... Use Ctrl+C to exit
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Main_Task's ID is the_main_task_01ECD318
Started at 2014-06-18 10:28:47.51
2014-06-18 10:28:47.51 => A4A.Generic_Periodic_Task : started !
2014-06-18 10:28:47.51 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000000000 0.000000000
2014-06-18 10:28:47.51 => A4A_Console_Main : DPM (COS, State, Err) : 16#0#, 16#0#, 16#0#
2014-06-18 10:28:47.51 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000000000 0.000000000
2014-06-18 10:28:47.51 => A4A.MBTCP_Server.Periodic_Task 127.0.0.1: 1504 : started !
2014-06-18 10:28:47.51 => A4A.MBTCP_Server.Run : TCP_Listen... Server_Socket = 260
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Modbus TCP Server created...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Initializing cifX Driver...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Opening cifX Driver...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task :
***********************************************
Driver Information
Version : cifXDriver V1.2.3.0
Board Count : 3
***********************************************
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Opening cifX Channel...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task :
***********************************************
Channel Information
Board_Name : cifX1
Board Alias : DPM
Device Number : 1250410
Serial Number : 20276
Firmware : PROFIBUS DP Master
Version : 2. 6. 0(Build 13)
Date : 2013- 11- 13
***********************************************
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Initialising Channel Messaging...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Setting Flag Host Ready...
2014-06-18 10:28:47.51 => A4A.Kernel.Main_Task : Setting Flag Bus On...
2014-06-18 10:28:47.52 => A4A.Kernel.Main_Task : COM-flag not set
2014-06-18 10:28:47.52 => A4A.Kernel.Main_Task : Calling Cold_Start...
2014-06-18 10:28:47.52 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : Initialised !
2014-06-18 10:28:47.52 => A4A.Protocols.HilscherX.rcX_Public.rcX_Register_App.FB.Cyclic : Request Sent
2014-06-18 10:28:47.52 => A4A.Kernel.Main_Task : COM-flag not set
2014-06-18 10:28:48.52 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#20#
Src : 16#1#
Dest_Id : 16#0#
Src_Id : 16#487164#
Cmd : 16#2F11#
2014-06-18 10:28:48.52 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : Got a message : 16#2F11#
2014-06-18 10:28:48.52 => A4A.Protocols.HilscherX.rcX_Public.rcX_Register_App.FB.Cyclic : Confirmation received fine
2014-06-18 10:28:48.52 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : App Registered !
2014-06-18 10:28:48.56 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000209061 0.000876352
2014-06-18 10:28:48.56 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:48.56 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001707 0.000002133
2014-06-18 10:28:48.80 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#20#
Src : 16#0#
Dest_Id : 16#0#
Src_Id : 16#487248#
Cmd : 16#4405#
2014-06-18 10:28:48.86 => PROFIBUS_DPM_DPV1C2 : Connected
2014-06-18 10:28:49.09 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#20#
Src : 16#0#
Dest_Id : 16#0#
Src_Id : 16#4875C8#
Cmd : 16#4407#
2014-06-18 10:28:49.17 => PROFIBUS_DPM_DPV1C2 : Data Read
2014-06-18 10:28:49.17 => PROFIBUS_DPM_DPV1C2 : Software Revision : 01.05.00
2014-06-18 10:28:49.31 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#20#
Src : 16#0#
Dest_Id : 16#0#
Src_Id : 16#487504#
Cmd : 16#440D#
2014-06-18 10:28:49.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#1#
Src : 16#8017E710#
Dest_Id : 16#487164#
Src_Id : 16#0#
Cmd : 16#4428#
2014-06-18 10:28:49.36 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : Got a message : 16#4428#
2014-06-18 10:28:49.36 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Closed.FB.Handle_Indication : Indication received
2014-06-18 10:28:49.42 => PROFIBUS_DPM_DPV1C2 : Connection Aborted
2014-06-18 10:28:49.47 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Closed.FB.Cyclic : Answer Got
2014-06-18 10:28:49.52 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1C2.Closed.FB.Cyclic : Response Sent
2014-06-18 10:28:49.64 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000209061 0.000876352
2014-06-18 10:28:49.64 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:49.64 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001706 0.000002133
2014-06-18 10:28:50.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:50.73 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000209061 0.000876352
2014-06-18 10:28:50.73 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:50.73 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001706 0.000002134
2014-06-18 10:28:51.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:51.82 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000209061 0.000876352
2014-06-18 10:28:51.82 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:51.82 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001706 0.000002134
2014-06-18 10:28:52.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:52.92 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208634 0.001293195
2014-06-18 10:28:52.92 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:52.92 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001706 0.000002134
2014-06-18 10:28:53.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:53.99 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208634 0.001293195
2014-06-18 10:28:53.99 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:53.99 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002134
2014-06-18 10:28:54.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:55.08 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001293195
2014-06-18 10:28:55.08 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:55.08 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002134
2014-06-18 10:28:55.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:56.15 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001293195
2014-06-18 10:28:56.15 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:56.15 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002134
2014-06-18 10:28:56.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:57.19 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:28:57.19 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:57.19 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002134
2014-06-18 10:28:57.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:57.57 => EH_Level : LT_Main_Value = 7.19014E+01%
2014-06-18 10:28:58.24 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:28:58.24 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:58.24 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002134
2014-06-18 10:28:58.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:58.49 => A4A.Kernel.Sig_Handler : Signal Interrupt caught !
2014-06-18 10:28:59.31 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:28:59.31 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:28:59.31 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:28:59.36 => A4A.Kernel.Main_Task : Stopping Watchdog...
2014-06-18 10:28:59.36 => A4A.Kernel.Main_Task : Resetting Flag Bus On...
2014-06-18 10:28:59.36 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:28:59.48 => A4A.Kernel.Main_Task : Calling Closing...
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.rcX_Public.rcX_Unregister_App.FB.Cyclic : Request Sent
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : Got a message :
Dest : 16#20#
Src : 16#1#
Dest_Id : 16#0#
Src_Id : 16#487164#
Cmd : 16#2F13#
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : Got a message : 16#2F13#
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.rcX_Public.rcX_Unregister_App.FB.Cyclic : Confirmation received fine
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : App Unregistered !
2014-06-18 10:28:59.48 => A4A.Protocols.HilscherX.Profibus_DPM.DPV1.DPV1_Task : Terminated !
2014-06-18 10:28:59.51 => A4A.Generic_Periodic_Task : finished !
2014-06-18 10:28:59.67 => A4A.MBTCP_Server.Run.Close : Closing gracefully.
2014-06-18 10:28:59.67 => A4A.MBTCP_Server.Periodic_Task 127.0.0.1: 1504 : finished !
2014-06-18 10:29:00.33 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:29:00.33 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:29:00.33 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:29:00.48 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:29:00.50 => A4A.Kernel.Main_Task : Resetting Flag Host Ready...
2014-06-18 10:29:00.50 => A4A.Kernel.Main_Task : Terminating Channel Messaging...
2014-06-18 10:29:01.34 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:29:01.34 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:29:01.34 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:29:01.48 => A4A.Protocols.HilscherX.Channel_Messaging.Receive_Msg_Task_Type : No packet pending.
2014-06-18 10:29:02.35 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:29:02.35 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:29:02.35 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:29:02.53 => A4A.Kernel.Main_Task : Closing cifX Channel...
2014-06-18 10:29:02.53 => A4A.Kernel.Main_Task : Closing cifX Driver...
2014-06-18 10:29:02.53 => A4A.Kernel.Main_Task : Deinitializing cifX Driver...
2014-06-18 10:29:03.37 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:29:03.37 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:29:03.37 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:29:03.54 => A4A.Kernel.Main_Task : finished !
2014-06-18 10:29:04.38 => A4A_Console_Main : Main Task (Status, Min, Max) : WD OK 0.000208209 0.001313674
2014-06-18 10:29:04.38 => A4A_Console_Main : DPM (COS, State, Err) : 16#7#, 16#4#, 16#0#
2014-06-18 10:29:04.38 => A4A_Console_Main : Periodic Task 1 (Status, Min, Max) : WD OK 0.000001280 0.000002986
2014-06-18 10:29:04.38 => A4A_Console_Main : finished !
Logging_Task terminated...
N’hésitez pas à nous solliciter pour toute question ou projet, présentation et démonstration ou formation !
A bientôt sur le forum, par email ou au téléphone.
Cordialement,
Stéphane