Luis Venturino Posted January 9 Report Share Posted January 9 hello In unilogic where are the system bits, how does the unilogic have it? I am having problems with the TCP/IP communication of a unilogic. It is frozen and it is necessary to reset. Does anyone have any suggestions? Luis Link to comment Share on other sites More sharing options...
Saragani Posted January 9 Report Share Posted January 9 There are System tags, and if you are creating TCP Server or TCP Clients, then each of them has it's own struct on the Global tags that indicates it's status, errors, etc. Link to comment Share on other sites More sharing options...
Luis Venturino Posted January 13 Author Report Share Posted January 13 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 More sharing options...
MVP 2023 Joe Tauser Posted January 14 MVP 2023 Report Share Posted January 14 Is it 20 separate records or one block of 20? Which version of UniLogic are you using, and could you upload your program? Joe T. Link to comment Share on other sites More sharing options...
Luis Venturino Posted January 16 Author Report Share Posted January 16 hello Joe, I attach the program. Let's see if you can help me. The unilogix version would be the last. Luis 20231228REV19_LUIS_2.ulpr Link to comment Share on other sites More sharing options...
ORSO2001 Posted January 16 Report Share Posted January 16 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now