raber

CJ1M serial communication

20 posts in this topic

Hi! I would like to know how I could send information throw serial RS232 communication. I mean, I have CJ1M-CPU11 connected with ID232 and OC201 modules, and I have an optic sensor (digital input). When the sensor turn on, I would like to be able to read the information (on/off) with an application like Putty (I have the PLC connected by RS232) to develop an application and show the information on another framework. I don't know if I have explained very well. Thank you!

Share this post


Link to post
Share on other sites

Should I use SCU41 unit additionally? or ETN21? or is it enough with RS232 wire from the CJ1M-CPU11? or using any function block from the library? Thank you four your help!

Share this post


Link to post
Share on other sites

An additional unit is not necessary. You may use the 9 pin serial port on the front of the CPU. Set the Mode to RS-232C. You'll want to use the TXD and RXD instructions. Here are some samples from the downloads section.

 

Share this post


Link to post
Share on other sites

I have been trying the samples. But now my CJ1M doesn't connect to the PC. If I try automatically search doesn't find it. Do you know why? Is it possible that I have transfered the samples configuration and now it doesn't connect? Can I reset CJ1M-CPU11 without connect with the PC, I mean because I cannot connect again and before I could.

Share this post


Link to post
Share on other sites

Set DIP Switch 5 to ON, Auto-detect CX-Programmer parameters at the RS-232C port.

Share this post


Link to post
Share on other sites

I tried it and nothing, anyway which are  Auto-detect CX-Programmer parameters (just to make sure that I did well) ? Is there any other way to try?

Share this post


Link to post
Share on other sites

Auto Online can be a bit quirky although it should work fine for default settings. The only settings for it are on that dialog box. After setting DIP switch #5 to ON, the 9 pin serial port settings will be 9600, 7, Even, 2.

If you are going to need custom RS232C settings then you'll want to get the programming cable for the Peripheral port for programming.

Edited by IO_Rack

Share this post


Link to post
Share on other sites

Okay, now is running. I set DIP switch #5 to ON and it connected. I would like to ask if I can do the same at the initial topic question:

 

"Hi! I would like to know how I could send information throw serial RS232 communication. I mean, I have CJ1M-CPU11 connected with ID232 and OC201 modules, and I have an optic sensor (digital input). When the sensor turn on, I would like to be able to read the information (on/off) with an application like Putty (I have the PLC connected by RS232) to develop an application and show the information on another framework. I don't know if I have explained very well. Thank you! "

 

But now with the SCU41-V1 module and RS-232C connection, can I use the same instructions, TXD and RXD to send information about the sensor state (ON/OFF) to the PC so I can read with an external application?

Thank you very much for your responses!

 

Share this post


Link to post
Share on other sites

I have read this: "Free Protocol mode. Free Protocol mode supports sending and receiving data using TXD (236) / TXDU (256) and receiving (RXD (236) / RXDU (255)) data. The Free Protocol mode can only be used with CS / CJ series CPUs with version 3.0 or higher with a serial communications card or unit with version 1.2 or higher." 

Is CJ1M-CPU11 version 3.0 or higher and SCU41-V1 unit version 1.2 or higher?

Share this post


Link to post
Share on other sites
2 minutes ago, raber said:

Is CJ1M-CPU11 version 3.0 or higher and SCU41-V1 unit version 1.2 or higher?

This information is printed on the right side of each unit. You'll have to disconnect it from the rack.

Share this post


Link to post
Share on other sites
On 20/11/2019 at 1:32 PM, IO_Rack said:

An additional unit is not necessary. You may use the 9 pin serial port on the front of the CPU. Set the Mode to RS-232C. You'll want to use the TXD and RXD instructions. Here are some samples from the downloads section.

I would like to ask if I can do the same at the initial topic question:

"Hi! I would like to know how I could send information throw serial RS232 communication. I mean, I have CJ1M-CPU11 connected with ID232 and OC201 modules, and I have an optic sensor (digital input). When the sensor turn on, I would like to be able to read the information (on/off) with an application like Putty (I have the PLC connected by RS232) to develop an application and show the information on another framework. I don't know if I have explained very well. Thank you! "

But now with the SCU41-V1 module and RS-232C connection, can I use the same instructions, TXD and RXD to send information about the sensor state (ON/OFF) to the PC so I can read with an external application? Can I choose that PLC transmit info by SCU41-V1 module?

Thank you very much for your responses!

 

Share this post


Link to post
Share on other sites

Yes you can.

Do you have the proper cable? Have you tried the examples?

Share this post


Link to post
Share on other sites
Just now, IO_Rack said:

Yes you can.

Do you have the proper cable? Have you tried the examples?

Yes I tried, but I couldn't. I don't know what I have to configure. I mean, for example, I have programmed the TXD instruction like:

TXD Source_Data #0 #10 where Source_Data is D0 (address) and Channel (type) (like in the samples)

But I don't know how to program the instruction so that it sends the sensor (address 0.00) value (on or off) and I don't know how to configure that the information is sended through the RS232 (port 2) at SCU41-V1 module.

Thank you very much for your answer.

Share this post


Link to post
Share on other sites

Your port is specified in the TXD instructions Control Word. A value of #0200 will specify Serial Communications Board Port 2. (See the Help on TXD)

A sensor at address 0.00 is in Channel 0, Bit 0. You can MOV Channel 0 to address D0 first if you wish to use D0 for transmit.

Share this post


Link to post
Share on other sites
18 hours ago, IO_Rack said:

Your port is specified in the TXD instructions Control Word. A value of #0200 will specify Serial Communications Board Port 2. (See the Help on TXD)

A sensor at address 0.00 is in Channel 0, Bit 0. You can MOV Channel 0 to address D0 first if you wish to use D0 for transmit.

Has it to turn on any led at SCU41-V1 module (moreover RUN and RDY) when it is transmitting correctly?

The steps I took were:

- Programming section with MOV instruction (params: S = 0, channel type; D = D0, channel type)

- Programming section with TXD instruction (params: S = D0, channel type; C = #200; N = #1)

- Transfer by RS232 port at CPU and RUN PLC

- Disconnect RS232 on CPU and connect on RS232 (port2) at SCU41-V1 module

- Use putty to check it sending data

But it doesn't work

Share this post


Link to post
Share on other sites

It's been a while since I've used the SCU41. I just did some more research.

Do you have CS/CJ Series CJ1W-SCUx2 manual? (Cat. No. W336)

There are some significant differences between the CPU serial port and the SCU's serial port. In short, you'll have to use the TXDU(256) instruction with the SCU unit. I'm working on an example now.

What is the Unit No. setting of your SCU41?

Share this post


Link to post
Share on other sites

Here is an example where my Unit No. is set to Unit 1, I'm using Port 2 of the SCU41.

MrPLC_SCU_Example.thumb.PNG.db3b9484672e

MrPLC_SCU_Settings.PNG.7ff11ed0ac661bf03

Share this post


Link to post
Share on other sites
19 hours ago, IO_Rack said:

Here is an example where my Unit No. is set to Unit 1, I'm using Port 2 of the SCU41.

It is working now. Thank you very much!

Note: I think one of the failures I was committing is not transferring CJ1W-SCU41-V1 Port 2 parameters to the Unit (I only clicked on OK)

Share this post


Link to post
Share on other sites
25 minutes ago, raber said:

It is working now. Thank you very much!

Glad you got it working! You're welcome.

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