Jump to content
mitachky

Ladder Logic Separation

Recommended Posts

Hi,

I was just wondering is there any way to separate my code like an "if else" statement in C.

For example. If a condition is met, I would like to run only a selection of 10 lines of code and if the same condition is not met, I want to run a different 10 lines of code.

Thanks in advance!

Share this post


Link to post
Share on other sites
Just now, Flex727 said:

Sure, place your conditional code in separate subroutines and call the appropriate one based on which condition is met.

Thank you very much sir! Will try that.

Share this post


Link to post
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.

Guest
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...