Jump to content

Ongoing.......Puzzle this and maybe learn something.


Ausman

Recommended Posts

  • MVP 2023

Hi all, thought I'd start a new topic where anyone can post a small snippet of a method they use and are happy to share.  Just initially a screenshot or link that will get the brain cells of forum participants working hard as to what it might be used for.

If it ultimately gets lots of different things submitted, it might become a little clunky and need "linked numbering" here in the first post.  To this end I suggest that the time turnaround is a maximum of 4 days between submission and telling the answer, unless it is already figured out by someone.   The answer is then given and a new one submitted.  We'll see how it evolves.    

I'll start the ball rolling with the next post, which I think is an easy one. 🤔

cheers, Aus

  • Like 2
Link to comment
Share on other sites

  • MVP 2023

Kratmel wins! 

It is the trigger method for Lead Lag on multiple HVAC compressors that run 24/7.  Single run lead lag on compressors is not very good for them if you only give them one run and then switch over.  Better to let them work a day as the Primary, cycling as necessary and I then use other algorithms to change them over when not called and time of day, load blah blah is more suited.

As to the 30/31 issue, I'm prepared to live with that.  The output is used on a whole host of other things as well that are not critical but need to change each day.....most of the time!

cheers, Aus

 

Link to comment
Share on other sites

  • MVP 2023

I think I need to have a new rule!  We need some vague reference to what type of machine etc the piece of code is in. 

To me, this is some constantly revolving reference to an amount to trigger actions. Maybe it's a speed controller run by increments/decrements from the MBs, but it could apply to all sorts of things.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023

Ausman's answer is very close to the solution.

Therefore, we consider Number 2 solved.

After all, thanks to his tips, I found a way to solve this 

 

Sometimes, even in simple task with the encoder, you need to show on the screen that the movement is right - left, or up - down.

It is also important to know when the object stopped.

 

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

Isakovic, please leave this unanswered for a few more days. 

Views aren't that much, and I know that forum members often don't cruise further down the forum list from the main topmost items, so perhaps it hasn't yet caught all the attention I thought it would. 

I'll give the topic a mention in those places if things don't pick up.

cheers, Aus

 

Link to comment
Share on other sites

  • MVP 2023

Hi, i try to decode Isakovich Enigma code :)

Then answer for Number 3:

Code do sorting numbers placed in  MI13, MI14, MI15, M16, MI17 .......  (If we change first Block in row 5 from > to < code change sorting direction).

If we change numbers in first row - we change MI used for sorting in this code.

Something like C++ for Visilogic....

  • Like 1
Link to comment
Share on other sites

8 hours ago, kratmel said:

Code do sorting numbers placed in  MI13, MI14, MI15, M16, MI17 .......  (If we change first Block in row 5 from > to < code change sorting direction).

That is right. N3 is solved.

It is used in compressor control to sort working hours. On that project I learned you'll need to use loops when doing optimization problems, I avoided them before.  Whole program is a heap of loops.

8 hours ago, kratmel said:

Something like C++ for Visilogic....

Code like this written in ladder gets hard  to follow even for simple stuff, bunch of indirect addressing. This program was written some time ago, if I needed to do it now I would try with UniLogic and C scripts, never used UL C functions to run actual machine, only for testing.

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