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

  • MVP 2023

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

  • MVP 2023
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.