Meth

keep program runing on Omron Sysmac CQM1-CPU4

9 posts in this topic

Hi everyone. I want to be able to download a progam to Omron CQM1-CPu41 that transfert a data to laptop via serial port,  and keep this program running even when i disconnect cable. 
What i did so far is ;

1- i download this example  http://forums.mrplc.com/index.php?/files/file/288-txd-rxd-quickstart-programs/
2- when i download the program to PLC, i can see COM2 flashes each time data transfered . then, i turn mode RUN on.

3- i turn online OFF, COM2 stop fashing, and disconnect cable from cx-programmer and laptop 
4- i try to connect cable to other laptop. i manage open serial port with right configuration (baude rate, parity,... ) with Node-red but with no data received. 

Am i doing it right?? if so, is there a simple cx-programmer exemple to transfert data from omron plc to laptop ? 

 

Share this post


Link to post
Share on other sites

yaeh i already change PLC setting  to CQM1-CPU41.. i'am just wondering if that program allow me to send data from PLC to PC when i set mode opration RUN to ON?   

Share this post


Link to post
Share on other sites

The CQM1 and the CQM1H have different instruction sets. Your conversion may be OK but I would use the link that Jay has provided. Also as Jay has suggested, Be sure to download the Settings. This is very important because it will set up the RS232 port. After downloading the Settings, cycle power to the PLC.

Share this post


Link to post
Share on other sites

first thanx for replying, second, sorry for my silly question, i'am new in cx-programmer , what do you mean by  cycle " power to the PLC" ?? 
Do you mean turn mode operation to RUN or MONITOR ?

Share this post


Link to post
Share on other sites

When you change any Settings in the PLC, you must turn the PLC Power OFF then back ON before the new Settings will be effective.

RUN Mode and MONITOR Mode allows PLC program execution. In RUN Mode you will not able to write data to DM, T, C, etc... Use MONITOR Mode if you need to write data from PC to PLC.

Share this post


Link to post
Share on other sites

thanks for your explanation.  what i'am trying to do is to read data sent from PLC to PC. SO i think i need RUN mode ? Right? 

Edited by Meth

Share this post


Link to post
Share on other sites

other thing is there a way to check the  AR flags to ensure the port is ready for sending?
and thanks in advance ...

 

Share this post


Link to post
Share on other sites

TXD Transmit
Operand 1 = Source word in PLC to transmit.  (Your DM0 must be set to the ASCii code to transmit)
Operand 2 = Control Word which sets port number (#0000=RS232)
Operand 3 = Number of BYTES to transmit less start & end code.  (2 is not enough.)
AR8.05      = On when port is not busy

Please use the original code in the sample program for CQM1.  Your settings are stll set to default.  Download the settings from the corrected CQM1 code.

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