Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 39325, Entry date: 07/19/2004

Automatic Start of Programs with I/O Access in File"inittab"

  • Entry
  • Associated product(s)

Why does a user program with I/O access not start up correctly, when being started in "/etc/inittab"? However, it runs properly when being started manually from CLI.

It is not permitted to access process periphery or system ressources prior to the proper start-up of M7 and its arrival in RUN status.

Call the command "M7GetState()" within one loop, until the system status RUN has been reached, only then your start the application itself. 
If the RUN status has not been reached after some time, you can also cancel the program again.


#include <stdlib.h>
#include "m7api.h"
#include "rmapi.h"
void main()
if (M7InitAPI() != M7SUCCESS)
while (M7GetState() != M7STATE_RUN)
// Start of the user program

Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links