OMRON CPM2A PLC Communication with PC

vislab

Member
Join Date
Feb 2005
Posts
20
Hi,

I am working on the OMRON CPM2A PLC Communication with a PC using RS-232C No-protocol communication.
The purpose of this small project is that as soon as I send a character in the Hyper Terminal using the pre-defined protocol in the PLC PC Communication setup by setting DM 6645 to DM 6649 areas I expect the PLC turns the Reception Completed Flag (AR 0806) ON and stores the received character data into DM 0200 area and also want to see the output LED 1005 is turned ON on the PLC front pannel.

Here is an Example that I used in the test.
DM 6645 1001 <- RS 232C mode and No-protocol communication
DM 6646 0030 <- 9600, E,7,1
DM 6647 0000 <- Transmission delay
DM 6648 1000 <- Start Code is Disabled and Endcode found in DM 6649
DM 6649 0D00 <- CR End Code

Another question is about the sending the data in the Hyper Terminal.
Is there anything to keep in mind about the COM port settings?
Then thank you.

Sunny
 
PM Message from sunny

About the PLC communication with PC
Nice to meet you.
I am working on the communication between a OMRON CPM2A PLC and a PC using RS-232C No-protocol communication.
Actually I used your sample code and took RXD part and tested it to see if it accepts data from PC through RS-232C port communication. I used Hyper terminal to send a character with CR, LR End Code and set it up with 9600BPS, 7 Data Bit, 1 Stop Bit, Even Parity as you used.

I used the AR0806 (the Reeption Completed Flag) and RXD instruction. And that the communication part between the PLC and the PC is that as soon as we type any 1 byte character in the Hyper Terminal based on the pre-defined communication protocols (For example 9600,e,7,1) the PLC turns the Reception Completed Flag (Ar 0806) into ON and store this received character data into the data memory area.

But it was not working as I expected and I doubted that the AR 0806 flag is not turned ON when the PLC receives a character data from the PC using the Hyper Termial application even if I tried different PC setups for RS-232C communication by settings from DM 6645 to DM 6649 shown in the memory of the program. Of course everytime when I changed the settings we downloaded the DM memory area to the PLC.
So I also want you to check these PC setup in the DM memory area for RS-232C No-protocol communication.

And also I want to make sure the SW1 on the front of CPM2A RS-232C port should be set OFF to use RS-232C No-protocol communication so that the communication is governed by the PC Setup in the PLC DM memory areas.

Anyway the bottom line is that it is not working yet as I expected.
Then thank you and see you later.

Sincerely,

Sunny

AS it has been pointed out for eons here at PLCs.net, the way to get a quick answer is not by Private Message. Please post all your requests in the forum so that all may assist. :nodi:

Thread from yesterday:http://www.plctalk.net/qanda/showthread.php?s=&threadid=12904
 
Last edited:
PLC To PC

OMRON SYSMAC CPM2A
I Have a Ladder program in my PLC installed and I'm using pin combination:

PLC PC
2 3
3 2
9 5
4-5

I'm trying to get the data from the Hyperterminal but no data displayed... I'm using WINXP Service Pack 2.......


Please explain in a lay man's term coz i'm not good in hardware programming... I'm more in database.... I'm looking forward for interface programming....


Thank you and God Bless... Please reply .......
 
Last edited:
PLC To PC

I followed you pin out but still it will not work in the hyperterminal no data captured.


Do u have any solution regarding this matter???
 
How is the TXD instruction programmed?

Hyperterminal will only received data sent by the plc program. You must have the TXD instruction properly programmed to send data through the RS232 port.

Hope this will help.
 
Hello everyone. can someone explain what is the underlying principle behind TXD and how will it going to affect the communication between PC and PLC via RS232? thanks a lot.
 
The TXD (Transmit) instruction commands the plc program to send the specified data to the RS232 port.

The post indicated that no data was captured using hyperterminal. Unless a TXD instruction was executed in the plc code, there would be no data for hyperterminal to receive from the 232 port.

Hope this helps.
 
Can you help me how can i get data from PLC to PC?

I'm using visual basic ....

As I think about this, maybe you should explain what you are trying to do. How do you want to use VB? What data do you want from the PLC?

The more information you can provide, the better we will be able to help!
 
PLC to PC

We have the PLC used to capture and interpret digital signal being feed by a sensor. These digital signals then are passed thru OMRON touch such that we will be able to see the data digitally.



These data then are being generated and are loaded to separate system manually every hour. A tendency to have a transposition error will most likely to occur. We wanted to eliminate/avoid the transposition error such that we think we can capture the data being feed by the PLC to OMRON touch screen thru RS232 to PC.

Basically our objective is to capture the data from what is being displayed by OMRON to PC and feed the data to a database by just clicking a certain button in a PC based program. We plan to use Visual basic if we will be able to capture the data from the HyperTerminal.

Would really appreciate thoughts and idea on how we will capture the data from either OMRON and or PLC thru RS232. Thanks
 

Similar Topics

hey anyone, I'm a student from Indonesia.. I have a project, It is about how to send and receive data by serial communication between PLC Omron...
Replies
2
Views
2,103
Hi All, need a little help in here.I never program PLC before but at the moment, I am task to backup PLC program on our machines which is using...
Replies
2
Views
5,655
Dear Experts Help me to upload plc program from Omron PLC CPM2A to laptop. CPM2A name is not in the device type setting list of...
Replies
1
Views
3,159
Hi, I have a CPM2A PLC setup for a machine. There is an rotary incremental encoder connected to the PLC at input 0.00 (A+ terminal of encoder) and...
Replies
1
Views
4,076
Dear PLC Experts, I am trying to go online with Omron Sysmac CPM2A PLC with CX-Programmer V 6.0 on Windows Vista Operating System. It gives...
Replies
7
Views
9,677
Back
Top Bottom