Sign in to follow this  
Followers 0
mrplcxxx

Need help with Omron FINS/TCP Unix code in W421

5 posts in this topic

Hello, I am trying to write a code to communicate with Omron PLC via FINS/TCP from a PC. The Unix FINS/TCP code is located in W421 p.186-191. (The page numbers mentioned are those appear on the PDF, not the page according to the PDF file itself). I have a some questions. 1. When sending a Memory Area Read command, I believe the whole command frame must be: Whole Command Frame (W421 p. 179) = FINS FRAME SEND Command (W421 p. 179) + FINS Command Frame (W421 p. 162 + W227 p. 19) Am I correct? 2. On W421 p. 190, Unix code lines 195-198, it appears that the received length (recvlen) is being calculated based the fed-back values. Line 198 has 8 taken away from recvlen, saying SUBTRACTING LENGTH OF COMMAND & ERROR CODE OF FINS/TCP HEADER. W421 p. 162 says that the FINS Response Frame Format has 2 bytes for FINS Command, and 2 bytes for the respose (error?) code. That adds up to 4. Why is 8 taken away then? 3. On W421 p.115-181, it appears that the FINS command is sent in two pieces (FINS FRAME SEND Command - 16 bytes, and FINS Command Frame - 18 bytes). I believe this is to demonstrate that the Whole Command Frame (TCP Data Section) can be split up by the TCP layer, which is mentioned in W421 p. 172. Am I correct? 4a. W421 p.189-190, line 183 to 228, shows that there are two FINS responses coming back from the PLC. Why is this the case? 4b. W421 p. 179 seems to say that the FINS FRAME SEND ERROR NOTIFICATION Command is sent back to the client only when an error occurs. Am I correct, or does the PLC send back a FINS FRAME SEND ERROR NOTIFICATION Command all the time, even when everything goes well (error code = 00000000)? 4c. W421 p. 189 line 185 shows that a FINS/TCP COMMAND is being received. What is this command if not the FINS FRAME SEND ERROR NOTIFICATION Command mentioned above? 4d. W421 p. 190 line 207 shows that the FINS RESPONSE FRAME is being received, with its length calculated just a few lines above. Does this suggests that the PLC actually shoot back 2 response frames? 4e. If the PLC does shoot back 2 response frames, where is it mentioned? Am I missing something here? 4f. How do you know if the responses will be sent if that order? Please help me. Thank you very much. W421-E1-04.pdf W227_E1_02_FINS_Commands_Reference_Manual.pdf

Share this post


Link to post
Share on other sites
Hello, Attached is what I found when looking at FINS TCP. It should be correct but I can not be sure I corrected it if I found an error during testing. PeakHMI does support FINS TCP and I know it works. So, at the least, you could use the trial version and Wireshark and capture the packets. FINSTCP.pdf

Share this post


Link to post
Share on other sites
Hey Mark, Can you tell me where you get that page from? Thanks.

Share this post


Link to post
Share on other sites
Hello, I made it when I was implementing the protocol in PeakHMI.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0