Jay Anthony

From PM this morning

16 posts in this topic

I want to get values from PLC Omron CJ2M-CPU13 with distance about 100m. PLC has RS232 and USB port, RS232 used to connect to HMI and USB port cant connect with distance 100m. I think i will buy Ethernet module, its ok ?

How can i get values from Plc to VBA with Excel ?

Share this post


Link to post
Share on other sites

I'll pass that along to the poster. :dance:

Share this post


Link to post
Share on other sites

Hi gcl shortt,

CPU13 cant use Option Board, just CPU3x can.

I think it just can use CJ1W-ETN21module.

Regards,

 

 

Share this post


Link to post
Share on other sites

Hi Tuan,

Yes you are correct. The CJ2M-CPU13 will not accept the option boards. Only the CPU3_ will accept the boards.

You can use the CJ1W-ETN21 Ethernet module.
https://www.ia.omron.com/products/family/1451/

The other option is to use the serial communication.
https://www.ia.omron.com/products/family/1651/feature.html
RS-422A/485 Port: CJ1W-SCU[]1-V1
500 m max. (total cable length: 500 m max., T-branch branch lines: 10 m max.)

Regards,

 

Omron CJ2M Serial Option Boards.png

Share this post


Link to post
Share on other sites

You could plug a CJ1W-CIF11 into the CJ2M-CPU13 RS-232 port.

Plugs into an Omron DB9 RS232 port and converts to RS422/485 terminal strip.

Just a thought.

Share this post


Link to post
Share on other sites

One configuration that hasn't been suggested yet is to replace that CPU13 with a CPU33 and add a CP1W-CIF01 if the HMI doesn't support an Ethernet connection.

Share this post


Link to post
Share on other sites

Hi gcl shortt,

How can i get values from Plc to VBA with Excel ? You know it?

Regards,

Share this post


Link to post
Share on other sites

Hi Tuan,

Here is a link that will show the Omron Host link Protocol using VBA. 
http://accautomation.ca/how-to-implement-the-omron-host-link-protocol-part-2-vba/

The CX software also comes with CX Server DDE. This should be on your installation disk. 
http://accautomation.ca/implementing-the-omron-cx-server-dde-and-excel/

Here are some additional links that you may find helpful:
Omron  Host Link Protocol using VB 6
http://accautomation.ca/how-to-implement-the-omron-plc-host-link-protocol/
Omron Host Link Protocol using VB.Net
http://accautomation.ca/implementing-the-omron-host-link-protocol-vb-net/

Conditional movement of data using excel
http://accautomation.ca/excel-conditional-movement-of-data/

Each of these links will take you to a specific post. At the bottom of each of these posts you will see a video also explaining the operation and programming.

Hope this helps you out.
Regards,

Share this post


Link to post
Share on other sites

Hi gclshortt,

Thank you very much for your support. it is really very helpfull.

If I connect directly a USB cable, I'll be the same as the Omron Host link Protocol using VBA ?

Regards,

 

Share this post


Link to post
Share on other sites

Hi Tuan,

The USB port is a bus for communications with various kinds of Support Software running on a personal computer. High-speed communications are supported. 
This is a port connected to Programming Devices only, such as the CX-Programmer.

Regards,

Share this post


Link to post
Share on other sites

Hi gclshortt,

I wanna use USB port and connect PLC with OPC Kepwave. 

It's ok ? Do you know it ?

Regards,

Share this post


Link to post
Share on other sites

Hi Tuan,

OPC Kepware will communicate either through the serial port or an ethernet port. It will not be able to communicate using the USB port of the PLC. This is mainly dedicated to Omron software only like CX programmer. 

Regards,

Share this post


Link to post
Share on other sites
On 9/27/2017 at 4:08 PM, gclshortt said:

Hi Tuan,

OPC Kepware will communicate either through the serial port or an ethernet port. It will not be able to communicate using the USB port of the PLC. This is mainly dedicated to Omron software only like CX programmer. 

Regards,

Hi gclshortt,

Oh. OPC Kepware will not be able to communicate using the USB port of the PLC .

How can i communicate using the USB port of the PLC with VBA.

Regards,

Share this post


Link to post
Share on other sites

As many have stated, the USB port is for programming, NOT data access.  You CANNOT use it with VBA to read controller data.

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