Jump to content

Difference between a module and a subroutine

Recommended Posts

Hello again everyone,

So I'm still trying to understand visilogic more to start programming my V570. And I want to ask you : what if the diference between a subroutine and a module ? Yes I know that a subroutine is a part of a module, but I want to know WHEN and HOW to use a subroutine and when to use a module ? 

Thanks in advance.

Link to comment
Share on other sites

HI chay, in some ways this comes down to personal preferences as to how to do things. 

But for a good basis to understanding, have a look at the help files, use index/Modules/Program Sequencing: Modules, Subroutines, Labels & Jumps.

See if this helps, and then come back with more questions.  You will no doubt get many different answers, all related to my first paragraph!

cheers, Aus

  • Like 1
Link to comment
Share on other sites

44 minutes ago, Ausman said:

this comes down to personal preferences as to how to do things.

It's totally this. It helps you organize the subroutines into subcategories. I rarely use modules (other than the Main module, of course), but once a program gets extremely complex, grouping subroutines into modules can make program development and troubleshooting a bit easier. The PLC doesn't care.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...