ProSoft Technology ProLinx S3964R Uživatelský manuál Strana 88

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 140
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 87
88 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 3 Software Conversions Instructions
RSLogix 5000 software allows for the option of parameters to be passed to
subroutines and also allows for the subroutine to return a result to the calling
routine by using the RET function.
The following RSLogix 5000 example illustrates how the JSR/SBR instructions
can be used to pass parameters to the called subroutine and return a parameter
from the subroutine to the main routine. In this example, the data_word1 value
is passed to the parameter flow1 while the data_word2 value is passed to the
parameter flow2. The called subroutine, Calculation, evaluates the parameter
fault and this value is passed to the parameter out_bit1 in the calling routine.
Instead of using a subroutine, another option is to use the Add-On Instruction
functions as discussed in Chapter 2.
RSLogix 5000 Parameter Passing
Zobrazit stránku 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 139 140

Komentáře k této Příručce

Žádné komentáře