Sign in to follow this  
Followers 0
louguite

Modbus Master With C200hg

3 posts in this topic

Hi! I would like to connect a C200HG to a GEFRAN's regulator which could be piloted with a serial input in modbus protocol. The C200HG had to be master. Could you help me by giving me some informations about how to use modbus protocol master with a C200HG? If you have any idea, please don't let me down!

Share this post


Link to post
Share on other sites
Hi! you can use a communication option board C200HW-COM03-V1 which has to be inserted in the option slot of the CPU (C200HG-CPU33 to 63). This board has a RS422/485 port that can be programmed with the CX-Protocol software. The board has multiple protocols, including a Protocol Macro function. By defining your own protocol you can emulate a Modbus master function. In Cx-Protocol you must to setup the port to Macro protocol mode, with the Gefrans's controller parameters (boud speed, data bits, parity, etc). Then, you will create a protocol with some transmision/reception messages which have to be called by a comm. sequence (the sequence has a number). After you created the protocol you must download it in the PLC. In the PLC program, the comm. sequence is called using the PMCR instruction, having the sequence number and data pointers for transmission and reception data areas as parameters. The data transmited/received to/from controller is vehiculated throu the data areas pointed by PMCR instruction. You must be carefull using the comm. board flags (Macro execution in progress, macro function abort, end of macro execution). The data from the receive buffer must be used just after "end of macro execution" flag is ON. Otherwise, you will get some junk data. I can send you some example of PLC program and Modbus RTU master protocol for CJ1 PLC's by Monday. Regards, Sorin.

Share this post


Link to post
Share on other sites
Hi! Thank for your help! I've ever used a PMCR function to connect a CS1 to a CQM1. I already know that in the PMCR fonction you had to enter a sequence number (control data 2) which correspond to a special kind of appliance (e.g. omron temperature controller...). I'm not sure that if you put the sequence number corresponding to the sequence you want with the GEFRAN's controller you will have what you you need! (if you know what I mean!). Could you send me your program sample? (louguite@hotmail.com) Have a good day! Best regards.

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