Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order for your modules to accept the parameters, you will need to define the module to have input parameters. In addition, you would need to set the refParm property to  the variables that are getting passed in. 

An example is below: 

Code Block
function myModule(parm1, parm2)

...

{

...


{
      pjs.define(“parm1”, { type: “char”, length: 20, refParm: parm1});

...


      pjs.define(“parm2”, {type: “packed”, length: 7, decimals: 2, refParm: parm2});

...

     

...


     
      //Continue pjs logic here.

...


}

 


You will also need to export the parameters and their definitions  when you export your module: 

An example is below: 

Code Block
module.exports.run = myModule;

...


module.exports.parms = [

...


	{type: “char”, length: 20},

...


	{type: “packed”, length: 7, decimals:2}

...


];