Sign in to follow this  
Followers 0
cpzao

Understanding the FINS Protocol

5 posts in this topic

Hello, I've been recently introduced in a project which consists in a series of CJ1-ETN PLCs which will connect with a computer via ethernet. In order to achieve this, I'll use FINS as it seems quite simple to understand and i've been messing around a bit with a VB program I was given and I couldn't understand the FINS command MEMORY AREA WRITE. This is the command being sent in the VB program I was given (I have no idea where it came from): 80,00,02,01,66,00,01,05,01,00,01,02,31,00,00,01,00,01,01 After sending this command to the PLC it activates or deactivates one of the outputs of a OC201 module. Never mind the commas, I just put them for readibility purposes :P After reading the FINS Commands reference manual, I understood The first set of bytes: 80,00,02,01,66,00,01,05,01,00 which are mainly concerned with the configuration of the communication (nodes, etc.) and also the two bytes that come after these: 01,02 which identify the MEMORY AREA WRITE command. My issue is concerned with the next byte: 31 which is related to the memory area code. After reading the manual I noticed this byte should be 80 (CIO, LR, HR or AR area), 81 (Timer/Counter) or 82 (DM), though in this case, it has 31. I'm still waiting for a version of CX-one to arrive (it has been ordered already) and I can not do much more on the PLC, therefore I'm going a bit blind here. What i would like to know is why number 31 associated with outputs? Shouldn't be associated to 80, 81 or 82? Thanks in advance for your replies! Carlos

Share this post


Link to post
Share on other sites
Hi Carlos, I think you are right, it should be 80, I also wondered what 31 was. I think I am going to search it at this weekend. However, I believe that driving the outputs directly from PC may not be safe because PC is not stable at all. Especially if you are using Ethernet communications, network delays may be a problem and you may not be able to change your outputs when you need it. For example, you may not be able to stop a motor in case of emergency. It may be better to drive outputs over data memories. Human body does the same, decisions are made by brain but reflexes are managed by cerebellum. I mostly design my systems by thinking PC as brain and PLC as cerebellum. Edited by moosty

Share this post


Link to post
Share on other sites
Carlos, You probably want to get a hold of the CS/CJ/CP Communications Commands Reference Manual from Omron. W342-E1-12 The memory area code of 31 is for the Work Area (WR), addressed by bit. (Section 5-2-2 page 165) Some common memory area codes are: 30 - CIO by bit 31 - WR by bit B0 - CIO by word 82 - DM by word The command breakdown for Memory Area Write is on page 174. (Section 5-3-3) 0102 - Memory Area Write 31 - Work Area, by Bit 0000 01 - W000 bit 1 (first 4 bytes are word address in hex, next two are bit in word) 0001 - One item to write 01 - Data for item Hope this helps out. Steve

Share this post


Link to post
Share on other sites
CS/CJ/CP Communications Commands Reference Manual@MrPLC.com

Share this post


Link to post
Share on other sites
hello everyone! curiously or not, I just received an e-mail from omron showing me this manual and explaining me the WR issue! Many thanks everyone! I'm planning to put the intelligence on the PLC, though, as I still don't have any cx software, i'm still unable to do much in the PLC therefore, to make some simulations and study some applications of what i'm doing, I'm working like this :). once again, many thanks everyone! Carlos

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