I can’t find a way to debug the startup of my PLC. Is there any?
Also we have a bug that the PLC isn’t available over it network ports but it seems to run. The help mentions from AR V4.33 there is no way to debug over serial and only over TCP/IP . How can we debug this behaviour?
What PLC and which Automation Studio Version are you using ?
1.) if you mean how to work with debugger breakpoints:
you can use a workaround by copying the initialization code (_INIT) to the _CYCLIC and use an additional boolean flag, e.g.
PROGRAM _INIT
startup := TRUE;
END_PROGRAM
PROGRAM _CYCLIC
IF startup THEN
startup := FALSE;
// initialization code
ELSE
RETURN;
END_IF
// cyclic code
END_PROGRAM
2.) not a simple answer possible. Here what to check: Online connection
Depends on what you mean by “the startup of the PLC”.
If you mean the _INIT phase of tasks, there is a solution for that: implement an endless loop that will only be left if a PV is set, transfer the task and restart the PLC. After the restart, start the debugger and use breakpoints after the loop. Break the endless loop by setting the variable and you will be able to debug through the _INIT part.
void _INIT ProgramInit(void)
{
while (start)
{ int temp = 1; }
//stuff to debug
}