Help - Search - Members - Calendar
Full Version: CP1L-RXD Problem - Please Help
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Programmer
iyad
Hi all,

i have CP1L-M30D with CP1W-CIF01 serial option board
i use RXD to receive data from Host computer, here my program

LD CF113 (P_on)
RXD D130 #0100 &8

i not use A392.14 (Reception Complete Flag) cause it never going ON

but data from Host Computer never receive complete by PLC,
when i send 8 lenght data PLC just receive 4 lenght data(LSB) and sometimes 3 data leght
for example when i send 12345678, PLC just Receive 8765 (in ascii) and sometimes 876(in ascii)

please help
iyad
Hi All,

i've resolved my problem before but now i get new one,
i change my program befor with

LD 0.00
AND A392.14
RXD D130 #0100 &10

LD 392.14
OR 100.06
OUT 100.06

and data have receieved Complete by PLC .
but why 100.06 never going to ON?



Morten AA
Hi Iyad

Perhaps you need to have the syntax LD A392.14??

Regards

Morten
iyad
Hi Morten
Thanks for your reply

yes i use A392.14, in my post before

LD 0.00
AND A392.14
RXD D130 #0100 &10

LD 392.14 =====> typing miss,here right one : LD A392.14
OR Q100.06
OUT Q100.06

but why Q100.06 never going on altough data have received complete by PLC?
PMCR
I think there is a misunderstanding of the Reception Completion Flag.
The Reception Completion Flag turns on when there is a message in the buffer of the port that matches the End Code set in the port setup. You can select 1) a specific number of bytes, 2) CRLF, or 3) a single character that you specify.
Lets say you set CRLF as the End Code. When your data 12345678<CRLF> is recieved, the Reception Completion Flag turns on.
At that point, you should execute the RXD instruction.

The RXD instruction will reset the Reception Completion Flag, so when viewing the ladder, you normally will not see the bit on, because it turns on and off quickly (typically in a single scan).

Also, please use the Port 1 Reception Counter (A394) to know how many bytes are in the buffer.

Click to view attachment
iyad
Hi PMCR,

Thanks for your replay,

QUOTE
The Reception Completion Flag turns on when there is a message in the buffer of the port that matches the End Code set in the port setup. You can select 1) a specific number of bytes, 2) CRLF, or 3) a single character that you specify.

actually, i have set in the PLC setup with 8 bytes data will receive without Start Code and End Code,
and data received completely by DM130 (program in my post before).
is End Code in the port setup is a must to make Reception Completion Flag turn ON?

QUOTE
Lets say you set CRLF as the End Code. When your data 12345678<CRLF> is recieved, the Reception Completion Flag turns on.
At that point, you should execute the RXD instruction.


when my program like here :
LD A392.14
OR Q100.03
OUT Q100.06

would Q100.06 turn ON when data received complete?


actually i would make a machine with stepper motor will run when data received by PLC and data received on DM130 is many pulse to rotate the motor (after converted), so i need A392.14 to start the stepper?
could you give me any option suggestion?

Thanks
Iyad
lostcontrol
If you post your CX-P file, it may be easier for everyone to see what you are doing, and what you have configured.

Including mnemonic descriptions is fine some of the time, but for what you are asking, you need to post you config settings as well.


PMCR
The Reception Completion flag will turn on when 8 bytes are in the buffer if you have Received Bytes selected, with a value of 8 for the end code.

I really do not like this method.
If your device sends 4 bytes, then becomes unplugged, stops transmitting, etc, you now have 4 bytes in the PLC serial buffer.
The next time your devices sends data, it sends the normal 8 bytes.
So now you have 12 bytes in the buffer. If your RXD instruction is set for 8 bytes, it will read the first 8 bytes, leaving the remaining 4.
In this case, you have an incomplete message, and the cycle will repeat.

If you cannot use a terminator (which is the method that I would recommend if possible), please use the Reception Counter (A394 for port 1) as the 3rd parameter of the RXD instruction. This will prevent the situation I have described above.

As far as your need to turn on an output, simply use a SET instruction on an internal bit (W0.00 for example) just before the RXD instruction as shown below. This will turn on in the same scan as the RXD instruction. Reset the W0.00 elsewhere in ladder.

Click to view attachment
iyad
Hi PMCR,

thanks for your reply,
i have solve for my problem with end code CRLF, and now machine working properly

thanks fror your support

Thanks and Regards
Iyad
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.