HomeWindLGC

Discussion for our SmartRelay programming software.

IDEC PLC SUBROUTINE PROGRAMS Messages in this topic - RSS

ASDR
ASDR
Posts: 21

9/17/2018
COULD YOU PLEASE A SAMPLE OF SUBROUTINE PROGRAM
0 link
Shane
Shane
Moderator
Posts: 282

9/18/2018
A subroutine contains the same logic as the main routine. Only difference is you call subroutines from the main routine based on whatever parameter you specify such as an input being on. One command to call the routine is the LCAL instruction. Often I just use them to organize my programs. I'll separate the PID logic, scaling logic, alarms, etc. and call these subroutines continuously by using a normally open bit with M8125. If your program gets large this can help keep it more organized into sections. If you don't need a subroutine on all the time, switch it off and your program can run faster.
0 link
ASDR
ASDR
Posts: 21

9/19/2018
thanks, do you have any sample program to understand easily.
0 link
iiasgplc
iiasgplc
Posts: 3

10/15/2018
ASDR wrote:
thanks, do you have any sample program to understand easily.


Attachments:
add_subroutine.png
0 link




Powered by Jitbit Forum 8.2.0.0 © 2006-2013 Jitbit Software