Jump to content

Flex727

MVP 2023
  • Posts

    3,325
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 35 minutes ago, Mia said:

    So I should use the auto-tune one and just insert the PID values myself?

    Yes. The PID Config without Auto-tune is an older version that remains there for non-Enhanced Vision products. Your V570 is an Enhanced Vision product and should use the PID Auto-tune FBs. Besides the P, I, & D, be sure you enter values for:

    Sample Time

    Process Value Low & High

    Control Value Low & High

    and of course, target value.

  2. 48 minutes ago, dhuggins88 said:

    Yours ain't too shabby either, Flex! I have noticed that you like to have more of a bread crumb approach..but all you gotta do is follow em!

    You're too kind. My approach, as is most of the other experienced members on this forum, is not just to answer questions, but to teach. More education helps the user and anyone else browsing these boards. I could have written your program for you in about 2 minutes flat, but you would not have benefited as much. We all learn best while doing, not watching.

  3. I haven't had time to review your code yet, but I'll make a general statement. Typically there isn't an easy or elegant way to have a master control in two different places. In any system there can only be one master if you want straightforward code, at least in my experience. If you need two different masters controlling the same thing you generally have to think it through very carefully and the algorithm will have to be tailored to the exact situation. You have to deal with communication timing and register overwrite. It can easily become a mess, especially if you don't fully understand the underlying mechanics.

    If someone smarter or more experienced than me comes along with elegance, I am definitely interested in learning along with you.

  4. -You don't need anything in the bottom part of the MODBUS Configuration in the slave.

    -You really don't need anything gating your SCAN_EX FB in the Slave. Just hang it directly on the left rail.

    -Place your MB 0 (Ready to connect) after you MODBUS Configuration, not before. You're NOT ready to connect until you've configured your MODBUS communications. It doesn't really matter since the config does occur before MB 0 gets used, but it's the principle of the thing.

    -Use a Direct Contact of SB 13 instead of a Positive Transition of SB 3.

    -You don't really need the delay timer TD 0.

    None of these things would stop your program from working, but I'm trying to help you with best programming practices.

    58 minutes ago, dhuggins88 said:

    It's actually pretty straight forward now that I see it.

    MODBUS is simple and straightforward. It's also very universal. I use it whenever possible. The only thing you have to watch for is getting all the details right. Once you've done that it's smooth sailing.

    Feel free to ask about any of these suggestions if you're curious.

  5. 21 minutes ago, dhuggins88 said:

    I went in to all the Socket Parameters on the slaves and everyone of them show socket 0 and port 20000 which is not even close to being correct.

    What does "I went in to all the Socket Parameters" mean?

    In my post above I was suggesting you use Socket 2 in the slaves and initialize to 20261 - 20263. It doesn't matter which socket you use as long as the port number is correct. Also make sure they're all initialized to TCP Slave. The default for Socket 0 is UDP.

    My other suggestion is to limit your code to a single slave and get that working properly before trying to tackle communicating with 3 slaves simultaneously.

×
×
  • Create New...

Important Information

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