![]() If you can provide specific on the 3rd part device (Manufacture and Device) it would assist in the troubleshooting. You can use Wireshark to capture the data packets and see what type of response you are getting to the Modbus TCP/IP queries. Example, if you attempt to read Modbus Register 400001 thru 400010 range and the controller does not have Modbus Register 400005 it may reject the message instead of returning the data. The 3rd item to check is to make sure that the range of registers that you are requesting is valid and contains no gaps. Some devices will NOT respond to a Unit ID = 255. The Unit ID is equivalent to the Modbus Address. The Modbus TCP/IP Products uses the Unit ID to direct the message through a bridge or gateway. The 2nd item to check is the I/O Scanner Unit ID that is being used. The I/O Scanner will only Read and Write Modbus 4x Registers. The I/O Scanner will initially attempt to use Function Code 23 Read / Write and if that fails with will them use Function Code 4 and 16 to process the Read and Write in the same message. The function block may be monitored on-line by right clicking on it and selecting refine.The first item I would investigate is wat Modbus Function Code the 3rd party device supports. These data instances may be referenced within the program if the variables within the function are of type in, out, inout, or public. This is also the case with standard function blocks. Note when the DFB is used in the program it will automatically create the data instance. In each case go to the end of the table and enter the name of the new DDT/DFB, select the plus symbol to expand and add elements to your definition. To create a DFB (defined function block) Tools - Data Editor and select the DFB tab. To create a DDT (defined data type) Tools - Data Editor and select the DDT tab. User functions can contain other user functions. ![]() DDTs and user functions (logic not the interface) can be modified on line. These DDTs can be passed into user defined functions as inputs, outputs and inouts. UnityPro lets you define both user defined data types (DDTs) and user defined functions (DFBs). How shall I organize my DFB an DDT to achieve my purpose ? ![]() This prevents me from using only "Public" variables. On "unity Pro - Program Languages and structure reference manual" I read that "Nested DFBs are declared as private variables of the parent DFB". I would like to build a DFB "Machine" that would include several nested "Valve error" DFB's. I can store the "Preset time" and "internal time" values on the Machine1.Valve1 structure (as TIME data type), but I can't manage to make things work. On unity Pro, I'm having dificulty to achieve the same results. This will use the TON I've included on "Valve" definition. On RSlogix I can call a subroutine using "Machine1" as an InOut argument and then (inside this subroutine) call the error subroutine using "Machine1.Valve3" has an InOut argument. I would like to define my DDT as, and so on. I have 10 machines, with 8 pneumatic valves, each one.Įach valve has an error bit, SET if the Closed/Open limit switches do not match the desired position, after a preset maximum allowed time. My application for Modicon is as follows: I allways call the subroutines using only InOut parameters, which is very practical. I'm used to create "multilevel" UDT's, nesting several UDT's. Theres not much knowledge of this UDE platform within Schneider Tech Support however, so trying to get support for it is almost impossible. My main issue is this: RSLogix 5000 allows me to create UDT's (User Defined Data Types), that can include Timers. My expectation is that the Unity Pro Server requires a running instance of Unity Pro / ControlExpert. On the negative side: I can't "see" a subroutine ("user function block") instance, like I can on RSLOGIX 5000. The Red/Green background on Structured Text is also a plus. The software allows programming in many different programming languages such as Function Block Diagram (FBD), Ladder. It seems to have some advantages: much better"animation table" management, built-in simulation mode. ![]() Now I have to develop a program for a Modicon M340. I'm used to Rockwell RSLogix 5000 (version 16.0)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |