Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script download problem

I have found a problem when downloading a motion program. PPMAC vers and IDE

I have a "sub" program which is called from a "subprog". The structure of the sub program is like this:

sub: DoCalcs(void)

local var

//some code here

if (error)
//some code

var = a + b; //some code using "var"


This code does not download because the local variable "var" is not recognised as an L variable. If I move the local declaration after the return that's inside the if loop, it will download. It seems that the sub doesn't get its end point right.

If I make a similar code structure in the higher level "subprog", it downloads perfectly ok - so it only seems to be a problem in the lower level "sub" program.

You declare your “local variables” as argument in the subroutine. The IDE automatically uses L-variables. There is no usage of “void”.
See the section “IDE Program Enhancements” in the “Power PMAC User’s Manual” starting on page 640 for details.

Forum Jump:

Users browsing this thread: 1 Guest(s)