Jump to content

Store function not working


Recommended Posts

  • MVP 2023

Moved... to appropriate forum section

Standard problems:

-- MB47 and MB50 are not activated according to the program;

-- the piece of code you wrote lies in a routine that is never called anywhere;

--there is another place in the program where variables MI97 and MI116 are overwritten with another value or initialized.

 

If possible put your code here otherwise it's hard to tell where the problem lies.

P.S. What plc are you using and how do you test your code?

 

Link to comment
Share on other sites

  • MVP 2023

and as well....

--  Split this into 2 rungs,

-- Ensure that MB50 & 47 (and perhaps any other MBs that also dictate parameters) cannot be called at the same time...only one of them (all).

Re the "routine that is never called anywhere" noted by Kratmel, read this:

Point 11 in here:  https://forum.unitronics.com/topic/6229-ongoing-24-topics-almost-worth-pinning/

cheers, Aus

Link to comment
Share on other sites

Fixed the issue. I had created a new subroutine just for that code, and I guess the program never called on that subroutine, so I moved it into the main subroutine and now it works fine. 

For future reference, how do you call up a subroutine? (I should probably read the help section 😁

  • Like 1
Link to comment
Share on other sites

On 12/14/2023 at 4:33 AM, JW0807 said:

Fixed the issue. I had created a new subroutine just for that code, and I guess the program never called on that subroutine, so I moved it into the main subroutine and now it works fine. 

For future reference, how do you call up a subroutine? (I should probably read the help section 😁

Yes 🙂
image.png

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.

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