Jump to content

system bits unilogic


Recommended Posts

Thank you very much Saragani

I already have the communication bits identified. As I mentioned in the initial question. Modbus communication is disconnected and data is frozen for no apparent reason.

using modbus TCP/IP. and 20 periodic records.
I try to see if packets are lost or any communication errors are generated.

What is more advisable to do to read modbus. Periodic or Aperiodic based on time?

Luis

Link to comment
Share on other sites

hi Luis...let me jump in this topic...I downloaded your project and take a fast look...so...in my opinion...you have to modify a "little" how the program is planned...i mean...you just have the main function (function1) and a RTC to ASCII UDFB...in the main function you are doing to many things mostly to many thing in a single row...for example the below immage is NOT a good practice...let me say...i suggest you to split the whole "logic flow" in smalls logic block (UDFB) ...for example...one to manage the input and output, one to perform the calculation/formula...like you already did for the RTC to ASCII...then put the UDFB in main function...in this way the program should be more cleare and maintainable...last...you have not to pay for every ladder row (😁)so split the commands...in each row put just "one" command/action let at the row below go forward...

than...you defined many tags about "ethernet" connection bu no one of these are really coupled with any "ethernet" struct of PLC...in your case "BCU Sick"...also you define the MODBUS TCP as "periodic"...some at 200 others at 100 ms and a response time about 500 ms...are you sure that this frequency are ok?

usualy I use aperiodic strategy because i prefer send the query to the slave when i want...also usually i create tags to store the "success" and "fail" transaction...comparing these with the original tag of the ethernet struct I will know if every query was succesful or not...then i do what i need...also because with the aperiodic you can define an "ID" and  "groupID" for each tag...that is pretty useful....at the end your ethernet struct has a "status" tag that define how is going...check it to have some more information....let us know.

immagine.thumb.png.3d9fcbf84c742fbf9e3eda4196f95392.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...