Home

Profibus

Net Theory

Service

Products

Download Docu

EC32

RTC-32

SMB New

New: Preventive Maintenance Issues

Support New

Disclaimer


RTOS-32


Statistic

Private

Translate

 


ICS

Industrielle Automatisierungssysteme GmbH

 
           
Home News Products Company Profile EC32-Info Download Contact
 

EC32 - System Trace Messages


The following screen shows an application with an opened trace-window. The window is primarily used for interactive communication with the system software as well as for monitoring the system activities and debugging purposes.

Opening the trace window is accomplished by the keyboard entry CTRL+W. When the window is open certain commands may be entered in order to check the system activities without interferring with the normal program execution:

Typing CTRL+T enables an input prompt. Enter '?' for getting help on the possible functions:

INPUT >?

 

====TRACER FUNCTION: HELP====================================================

(CH)annels: Shows the channel parameters

(CO)ntrols: Shows the control parameters

(CP)u.....: Shows the CPU-load in %

(DEV)ice..: Shows hardware related information

DUMP......: <Channel Start> shows the content of a data buffer

(?)Help...: This screen

IF........: Shows IP data of network adapter

IRQ.......: Shows the Interrupt-Statistic

(LI)st....: Shows a list of the active configuration files

(LO)g.....: <ON, ON+, OFF>  Log Tracemessages to HD

MEM.......: Shows the available memory

(PI)ng....: Tries to ping a remote host system via the network

SHUTDOWN..: Terminate the program

(ST)atus..: <application> calls the status function of <application>

(SYS)tem..: Shows EC system properties

(TA)sks...: List of all tasks

(TR)ace...: Display or modify a trace level

(VER)sion.: Shows the version of all modules

(VI)ew....: <dateiname> shows the content of a file

(DA)te....: Shows/Sets the system date

(TI)me....: Shows/Sets the system time

(US)ser...: Shows the current Telnet-User

Name/uname: Shows the current system name

====END OF TRACER FUNCTION===================================================

 

Debugging:

Just like all the other tasks running inside the EC32 system also the main application task maintains several status machines. The required actions are triggered by events from several locations within the source code in the following way:

 DoCmd_A(__FILE__, CHANGD_A, SHOW_STATUS, 1000);

The function DoCmd_A() looks like this:

SWORD DoCmd_A(PSTR file, SWORD Ch, SWORD Cmd, SWORD Loc)
{
  if (Ch == CHANGE_STATE){
    if (AppRes_EC[Handle_A]->TraceLevel > 2){
       sprintf(ac_Temp_A,"%s> State <%s> --> <%s> Loc: %d", file,

       ActionState[A_Info.State], ActionState[Cmd], Loc);
       ECTraceMsg(Handle_A, NOCHAN_EC, TRCINFO_EC, F_GEN_STRING, ac_Temp_A);
    }
  A_Info.State = Cmd;
  }
  else {
    if ( (Ch >= 0) && (Ch < NumChan_A) ) {
       Chan_A[Ch]->Flags[Cmd] = TRUE;
       if (Ch == CHANGD_A) {
       }
       else  {
         if (AppRes_EC[Handle_A]->TraceLevel > 3) {
           sprintf(ac_Temp_A,"%s> Flag %d set for <%s> , Loc: %d",

                   file , Cmd,   ChanNames_A[Ch], Loc);
           ECTraceMsg(Handle_A, NOCHAN_EC, TRCINFO_EC, F_GEN_STRING, ac_Temp_A);
         }
       }
    }
    else {
        if (AppRes_EC[Handle_A]->TraceLevel > 1)  {
           sprintf(ac_Temp_A, "%s: Flag for inv. chan. %d, Loc:%d",

                              file, Ch, Loc);
           ECTraceMsg(Handle_A, NOCHAN_EC, TRCERROR_EC, F_GEN_STRING,ac_Temp_A);
        }
    }
  }
}
 

 

This feature produces an entry in the logfile similar to the following line:

10:39:35 APP1> A_appl.c> Flag 9 set for <LOG>, Loc: 1004

It shows from which source file the command originated, which flag was set, which task has been commanded and at which location within the source file the command was given. During the development process these numbers are generated automatically by a specific ultility, which updates all source files of a software project.


back to previous page

 

 

         
Home Search Sitemap Our friends Security FAQ Contact

 

© 2004 ICS GmbH. All rights reserved. - Last update: December 12, 2004 - Webadmin: service@ics-control.com