KY WONG

QJ71C24N INPUT PROBLEM

16 posts in this topic

I am using QJ71C24N to communicate with my devices, ASCII mode. I can send my output to the device by using non-protocol method ( G.output). However,  when I using G.input to try to receive the feedback from my device. The signal seen not stable to receive by my PLC. Sometime can get the full signal sometime can't and sometime I get some messy signal. Is there any setting I need to set to get the stable feedback from my device? Please anyone can help me to solve this problem? 

Share this post


Link to post
Share on other sites
8 hours ago, KY WONG said:

I am using QJ71C24N to communicate with my devices, ASCII mode. I can send my output to the device by using non-protocol method ( G.output). However,  when I using G.input to try to receive the feedback from my device. The signal seen not stable to receive by my PLC. Sometime can get the full signal sometime can't and sometime I get some messy signal. Is there any setting I need to set to get the stable feedback from my device? Please anyone can help me to solve this problem? 

If you use RS-485 on CH2 you should config to disable echo back if you are not disable it when you send data with G.Output there are data echo back to your RS-485 port because you connect RDA to SDA and RDB to SDB that cause G.Input Error. Then you should disabled echo back follow with this topic below.

 

http://forums.mrplc.com/index.php?/topic/35280-qj71c24n-ch2-echo-back-for-modbus-rtu-predefined-protocol/ 

 

In Example I installed QJ71C24N in Slot 2 (Start Addess: 0020)

If you installed QJ71C24N in Slot 0 (Start Address: 0000). Program will be changed to

 

-|SM402|---------[TO H0 H1C2 K1 K1]--

Edited by Wasan
1 person likes this

Share this post


Link to post
Share on other sites

Mr. Wasan, May I know is the signal reply timing will affect the result too? Because I saw there is some adjustment of the time of feedback signal. Is the timing of feedback will affect the feedback signal in my PLC? & Is there any command in Q series plc to calculate the CRC value for RS485? 

Edited by KY WONG

Share this post


Link to post
Share on other sites
7 hours ago, KY WONG said:

Mr. Wasan, May I know is the signal reply timing will affect the result too? Because I saw there is some adjustment of the time of feedback signal. Is the timing of feedback will affect the feedback signal in my PLC? & Is there any command in Q series plc to calculate the CRC value for RS485? 

You can use CRC value by go to QJ71C24N switch setting and select Sum check code to Exist

QJ71C24N_RS485_01.jpg.3bfdb1f14b60479bab

Then go to Various_Control_Specification and Select echo back on CH2 to 1:Prohibited and download parameter to PLC.

QJ71C24N_RS485_02.thumb.jpg.6404482b70d5

There are tools to check how data frame send or receive by QJ71C24N bygo to Tool -> Intelligent Function Module Tool -> Serial Communication Module -> Circuit Trace...

QJ71C24N_RS485_03.jpg.e5b7c87c9f1effffe7

Select Module and Channel then start trace and try to send/receive data it will collect data until you select stop trace after stop data frame will be shown below.

QJ71C24N_RS485_04.jpg.efbb8ed87f06822872

Share this post


Link to post
Share on other sites
On 16.10.2018 at 3:55 AM, Wasan said:
On 15.10.2018 at 8:36 PM, KY WONG said:

Mr. Wasan, May I know is the signal reply timing will affect the result too? Because I saw there is some adjustment of the time of feedback signal. Is the timing of feedback will affect the feedback signal in my PLC? & Is there any command in Q series plc to calculate the CRC value for RS485? 

You can use CRC value by go to QJ71C24N switch setting and select Sum check code to Exist

Regarding this point it is not defined which CRC you need. I'm pretty sure that the built-in CRC are ment for the MELSEC protocol and not when using "NonProcedural Protocol". In other words you need to write the CRC yourself. I might have some examples written in GX IEC Developer or GX Works2 (don't remember). Also, the topic starter is using ASCII and not binary, are you sure you are looking for a CRC (and not a sumcheck)?

@KY WONG: Which CRC do you need? Do you have a spec?

1 person likes this

Share this post


Link to post
Share on other sites
7 minutes ago, kaare_t said:

Regarding this point it is not defined which CRC you need. I'm pretty sure that the built-in CRC are ment for the MELSEC protocol and not when using "NonProcedural Protocol". In other words you need to write the CRC yourself. I might have some examples written in GX IEC Developer or GX Works2 (don't remember). Also, the topic starter is using ASCII and not binary, are you sure you are looking for a CRC (and not a sumcheck)?

@KY WONG: Which CRC do you need? Do you have a spec?

@kaare_t Thanks for clarify this I have confused about Modbus CRC from predefined protocol for non precedure protocol it cannot automatic create CRC you need to create manually.'

But for ASCII comunication just terminated string with <CR><LF> (H0A0D) it will collect data to buffer by G.INPUT function.

Share this post


Link to post
Share on other sites
23 hours ago, kaare_t said:

Regarding this point it is not defined which CRC you need. I'm pretty sure that the built-in CRC are ment for the MELSEC protocol and not when using "NonProcedural Protocol". In other words you need to write the CRC yourself. I might have some examples written in GX IEC Developer or GX Works2 (don't remember). Also, the topic starter is using ASCII and not binary, are you sure you are looking for a CRC (and not a sumcheck)?

@KY WONG: Which CRC do you need? Do you have a spec?

@kaare_t I wish to understand about the checksum. For your information, my ASCII Modbus device is using CheckSum8 Xor. Is there any PLC code can generate the Checksum for it? For your information, now I temporary off the function of checksum in my device function. 

Before this, I have used the FX PLC RS485 communication (RTU modbus format). As  I know there is a PLC code to generate the CRC-16/Modbus. Is the Q series having the special code to generate the CRC too? 

Share this post


Link to post
Share on other sites
23 hours ago, Wasan said:

@kaare_t Thanks for clarify this I have confused about Modbus CRC from predefined protocol for non precedure protocol it cannot automatic create CRC you need to create manually.'

But for ASCII comunication just terminated string with <CR><LF> (H0A0D) it will collect data to buffer by G.INPUT function.

@Wasan My device end code is <CR> only. It mean that my receive complete code specification setting is 13(Dh) right? The entire received input will go to specify buffer memory right?  

 

Share this post


Link to post
Share on other sites
2 hours ago, KY WONG said:

@Wasan My device end code is <CR> only. It mean that my receive complete code specification setting is 13(Dh) right? The entire received input will go to specify buffer memory right?  

 

Yes, you could change terminate string from 3338(0D0Ah) to 13 (0Dh) at Various_Control_Specification in Receive completion code specification.

QJ71C24N_Terminate_01.jpg

Share this post


Link to post
Share on other sites

@Wasan I have adjust the setting of echo back function. However, I still get the echo back in my input. Is there any setting I need to adjust? 

Share this post


Link to post
Share on other sites
12 minutes ago, KY WONG said:

@Wasan I have adjust the setting of echo back function. However, I still get the echo back in my input. Is there any setting I need to adjust? 

Please show your circuit trace. Maybe your PLC version is lower than use in configuration but you can direct access to buffer about this. Please follow as below thread.

http://forums.mrplc.com/index.php?/topic/35280-qj71c24n-ch2-echo-back-for-modbus-rtu-predefined-protocol/

Share this post


Link to post
Share on other sites

@Wasan I have just get 1 more issue. What is this mean?  Do you have this experience before?  

Capture5.JPG

Share this post


Link to post
Share on other sites

@KY WONG Maybe you CPU Version are older from use echo back setting you should change buffer 1C2H on QJ71C24N by add as this program below

QJ71C24N_U0_01.jpg

Share this post


Link to post
Share on other sites

@KY WONG: Regarding CRC, you mentioned that you needed to write a CRC check in code. Why? In the "Predefined Protocol Function" , CRC is automatically applied to both outgoing and incoming messages (see last line in picture). You should re-enable CRC on your peripheral device, and also use CRC on the Q. I would recommend using binary encoding also.

ModbusPredefined.PNG

Share this post


Link to post
Share on other sites

@kaare_t & @Wasan  thanks for helping me to solve the problem. I am grad to meet you here. Thank you very much. 

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