
CopperArc (Customer) asked a question.
Productivity Suite 4.7.2.4, P1-550 CPU (also happens when transferring to the Simulator).
My project validated with no errors but wouldn't transfer. It stopped at 0% on the second stage with "P1-550: The project's files could not be generated." The message doesn't name a task or line, and Saving shows no error. A new, simple project transferred fine, so Suite, the PC and the connection were OK.
I tracked it to one line in a Structured Text task: an IF nested inside another IF, where the inner condition is NOT on a Boolean array element with a tag as the index. Rewriting that line as a compare (= FALSE) fixed it, and the project transferred to the Simulator and the PLC normally.
Test code to reproduce it is below, then the workaround.
- (* ---------------------------------------------------------------------- *)
- (* REPRO: transfer fails with "The project's files could not be *)
- (* generated." Validate passes. *)
- (* *)
- (* Create these tags first: *)
- (* RunTest Boolean *)
- (* IdxTag Integer 32 *)
- (* HitCount Integer 32 *)
- (* FlagArr Boolean array, 1-D, 10 elements *)
- (* *)
- (* Pattern: NOT on a Boolean array element with a variable index, as the *)
- (* whole condition of an IF nested inside another IF. *)
- (* ---------------------------------------------------------------------- *)
- IdxTag := 1;
- IF RunTest THEN
- IF NOT FlagArr[IdxTag] THEN
- FlagArr[IdxTag] := TRUE;
- HitCount := HitCount + 1;
- END_IF;
- END_IF;
Workaround (same logic, transfers normally)
- (* ---------------------------------------------------------------------- *)
- (* WORKAROUND: same logic, written as a compare instead of NOT. *)
- (* Validate passes and the project transfers normally. *)
- (* Same tags as the repro. *)
- (* ---------------------------------------------------------------------- *)
- IdxTag := 1;
- IF RunTest THEN
- IF FlagArr[IdxTag] = FALSE THEN
- FlagArr[IdxTag] := TRUE;
- HitCount := HitCount + 1;
- END_IF;
- END_IF;
can confirm.
Interesting, at line 16, if I change the pointer from 'IdxTag' to a constant 1, the project transfers.
Thanks for reporting this. We’ve identified the issue and a fix has been developed. It will be included in the next software release. We don’t have a release date to share yet, but we’ll update this thread when we do.