Jump to content

Jason F

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Jason F

  1. Organization of data can be just as important as organization of the program itself.

    Large programs with no clear data organization are difficult to debug and follow.

    For everything that is seemingly arbitrary, you can usually figure out some means to treat it in a non-arbitrary fashion in order to add a level of clarity.

    As an example, I like to buffer all of my inputs and outputs into separate subroutines.

    If I have physical inputs I0 through I 15 I may buffer them to MB1000 to MB1015.

    For my physical outputs, O0 through O15 I may choose the "manual" buffer bits as MB2000 to MB2015 and the "auto" buffer bits as MB3000 to MB3015.

    Please forgive me for reviving an old post and possibly changing its topic, But by buffering your inputs and outputs in separate subroutines are you referring to having you inputs in their own subroutine and having them activate the MB and then using the MB in a different Subroutine instead of using the actual input? If so is there any issues using Positive and negative transitions on the MB from the Inputs in the program?

    The situation I have is I have similar machines with V280 controllers but different input cards. I would like to have the subroutines the same in the programs but use an I/O subroutine that would be Machine specific for the particular input card that is on the controller. I will refine a particular subroutine on one machine and will need to add that refinement to the others but the input format is different and is causing problems.

    Thank you in advance for any insight you will be able to give.

    Jason

×
×
  • Create New...