Sign in to follow this  
Followers 0
manowar

Sample of PROTOCOL MACRO

17 posts in this topic

Hello. I'm new in programming OMRON's PLC's. I would like to communicate between two PLC's via RS485. I'm trying to make simple program which would read D memory from another PLC and write D memory to another PLC. I have CJ1M PLC with SCU21-V1. I know that I can use PMCR(260) block, but I don't know how to use it. I have read manuals but it has too much information’s. What I would need is a simple program sample where it is described which communication to use and there is description of control words used in PMCR. I would really appreciated any help. Have a nice day. (my English is not so good...)

Share this post


Link to post
Share on other sites
Why make your life so difficult? If you are new to PLC's then DON'T use Protocol Macros. Use a CJ1W-CLK21Controller Link module instead of the Serial Module. You will be communicating peer-to-peer in minutes instead of days!

Share this post


Link to post
Share on other sites
Whoooooooaaaaa ! First are you connecting to to CJ1M PLC's if so you can use the inbuilt serial link between them...... Secondly Funny some times i think there is not enough info in the manuals What manuals have you read ?

Share this post


Link to post
Share on other sites
Hey Sleepy! Where's the documentation on direct serial connection WITHOUT using controller link cards. As always - wading through the fine print for OMRON is a challenge!! Didn't know of this option.

Share this post


Link to post
Share on other sites
From the promo brochure.... BTW I would recommend to use an isolated RS232 to RS485 convertor such as an AD4520 in lieu of the CIF 11

Share this post


Link to post
Share on other sites
Thank's for answers. How do I set PLC unit's addresses ( Unit 1, Unit 2,...) and which protocol for serial connection do I use? I have read about FINS commands via CMND block, but I don’t know how to use them. From what I have read, FINS commands are THE THING that I need. With FINS you can do exactly what I need to do. Read and Write DM memory from one PLC to Another. Does anyone have some sample where FINS commands are used? Again, help in OMRON pdf files is "fine", but I guess from what they write it only works in theory. If there would be simple sample included...... I can't use PMCR blocks because I have SCU unit only on one (master) PLC. Sleepy... Where do I find whole document which you attached to your reply?

Share this post


Link to post
Share on other sites
1. can only work with CJ1M plcs 2. 1 master can comm to upto 8 slaves 3. info was from promo brochure for CJ1M plcs 4. I have not set this up but..... the dip switch 5 will probably need to be OFF on each CJ1M PLC and see the settings below in the PLC setup for the PLC.... The words will be automatically mapped to MASTER WRITE AREAS 3100 - 3109 for master AND 3110 to 3119 for the first slave 0 MASTER READ AREA from SLAVE NODE 0 3110 to 3119 SLAVE 0 WRITE AREA is of course words 3110 to 3119 WITH SLAVE READ AREA being words 3100 - 3109 See the diagram posted earlier of the memory map.....

Share this post


Link to post
Share on other sites
Don't need any special FINS commands. Serial PLC Links are a low cost/fairly fast/simple method of sharing pre-defined data between PLC's. See attachment. Serial_PC_Link.pdf

Share this post


Link to post
Share on other sites
Thanks for uploading that info Bits&Bytes&Nibbles From what manual did you find the info...remember c'ing it once but couldn't find it yesterday..

Share this post


Link to post
Share on other sites
OMRON USA is gradually getting better at having the most up to date manuals available on their website. Used to be that MRPLC.COM was always one [two] steps ahead, but things are changing. Looks like OMRON is getting their s..t together!!! Here is link for VERY LATEST MANUAL. Hope it helps!!! http://oeiwcsnts1.omron.com/marcom/pdfcata...394E1080606.pdf

Share this post


Link to post
Share on other sites
... Note also you can use the 'Serial Gateway' setting on a master PLC (CS/CJ), and transmit/receive data using the SEND, RECV and CMND ladder instructions. (there are also FB's which make this easier to implement) -Master PLC needs port set to 'Serial Gateway', routing table used to map port to a network number. -Slave PLC's need to have ports set in hostlink mode with unique node numbers set. Although not as fast as 'Serial Link', you are free to transmit/receive to your own design. This method is not limited to CJ1M series only !! (the SEND, RECV, and CMND ladder functions issue FINS commands to the selected destination - see CS/CJ instructions reference manual) Nibroc Edited by Nibroc

Share this post


Link to post
Share on other sites
Nibroc can you append some programm samples of send and recive commands? Can this is used for communication via Peripherial port to serial port too? I need to connect two CJ1M cpu 11 on side on peripherial and secon on com port. I think send and recive commands will do it, but I don't know how. Which cable is right? I have NT2S-CN224-V1 and CS1W-CN226. Thanks

Share this post


Link to post
Share on other sites
Manowar, We recommend using the CJ1M series 'Serial Link' for your application. Is this OK? (This will only work using the RS232 ports + limited to 10 words transfer per PLC) - This method is simple and requires no programming ! Sleepy Wombat has posted example (see above) to set up 'Serial Link' for CJ1M - this works great, I have used it. The 'Serial Gateway' method I have mentioned is an alternative, and can be more flexible, but does require some ladder programming. Other methods exist !! Serial Gateway link between two PLC's: (see picture) - I have not tested this example but have set up similar. Nibroc Edited by Nibroc

Share this post


Link to post
Share on other sites
Is there any other way to comunicate via Peripherial and comm port with CJ1M cpu11? I beg you for program samples. And another question - not in contex: When I compile one of my programs I get this error: ERROR: Total output image exceeds UM size by 3258 words. Thanks. Edited by manowar

Share this post


Link to post
Share on other sites
hello manowar, This would indicate that your program is too large for your chosen cpu type. Go to "'View \ Memory View". This will display the UM used, the amount available and the total number of steps available for your CPU type (In the case of a CPU11 - 6144 Steps - bearing in mind that 659 Steps are used by the PLCs internal Header system, which means that you the user actually have a total of 5485 Steps). Hope this helps Regards anonymous

Share this post


Link to post
Share on other sites
Why are you stuck on using the peripheral port ? If a screen is plugged into it then you should be able to get that working on the peripheral port and use the RS232 port for ther serial link

Share this post


Link to post
Share on other sites
I have two plc. On one I have NT2S conected on peripherial port. Another port on that plc is reserved for communication. On plc number 2 I have TC35i modem on com port and peripherial port is reserved for communication. So I have com port free on one plc and peripherial on another. And I need to transfer data betwen them?! Thanks

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