Jump to content
OMRON Forums

Restricted local variable names


mshaver
 Share

Recommended Posts

In a PLC homing routine, I want to jog off of a home switch at the homing velocity, so I want to save the original jog speed and restore it at the end of the routine.

 

I'm attempting to use the following code to save the original jogspeed:

open plc 21

local JogSpeed;

JogSpeed=Motor[1].JogSpeed;

{etc. etc.}

 

Compiler coughs hairball with the following;

C:\Documents and Settings\mshaver\My Documents\PowerPmacSuite\PowerPmac3\PowerPmac2\PMAC Script Language\PLC Programs\plc21.plc(7,1) : Error : ( error #31) invalid parameter number in equation : L0=Motor[1].L0

Error: downloading preprocessed File: "/var/ftp/usrflash/Temp/pp_proj.pma"

There were errors during the download process and the download process has stopped.

 

Compile goes OK with use "of mJogSpeed", or with "L1" as my local variable.

 

So obviously, the compiler is confusing local variable JogSpeed with the element name of the Motor[1] structure.

 

I get it, I know how to fix it, no need to reply, unless I'm missing something, but I just must say Grrrrrrr!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...