Industry Online Support
Technical Forum
1/19/2010 9:53 AM | |
Posts: 5 Rating: (0) |
Hi, I am using CPU 224 along with PC/PPI cable connected to keyence make ' DL RS1' device for RS 232 Communication. I have succeeded in transmitting data as well as receiving data. I have parallelly conducted trails between PLC to PC (Hyperterminal) as well as DLRS1 to PC ( Hyperterminal ) just to make sure that i am on the right track. I am reading data perfectly inHyper terminal. Now the problem is that the data I receive in PLC...... is not the same as the data I receive in PC(Hyperminal) from DLRS1. ( PC receives correct data). Then I canged the baud rate to minimum (2400). The problem still existed. Besides the data PLC receives is repeatable for any number of trials for any given value. The PLC data is not listed in ASCII. It looks like it is listed in ANSI. I am uploaing PLC data(in Hex and ASCII types as I directly read it from Status chart) and its equivalent device value.( Stating and ending delimiters and command lines are excluded assuming you dont need them). AttachmentRS 232 Comm Results between S7 200 DLRS1.pdf (76 Downloads) |
1/19/2010 12:06 PM | |
Posts: 101 Rating: (11) |
Der Sharry, From my previous posts, please check: /tf/WW/en/Posts/1805#top and: /tf/WW/en/Posts/2208#top find below the code program that i thought it might be of help for you. ***in main*** ************************************************************************************************************** ORGANIZATION_BLOCK MAIN:OB1 TITLE=PROGRAM COMMENTS BEGIN --------------------------------------- Network 1 // Network Title // Network Comment, the @ sign should be written at the end of every sent message. ------------------------------------------ LD SM0.1 MOVB 16#09, SMB30 MOVB 16#B0, SMB87 MOVB '@', SMB89 MOVW +5, SMW90 MOVB 100, SMB94 ATCH INT0, 23 ATCH INT2, 9 ENI RCV VB100, 0 ****************************************************** ***in INT0*** Network 1 // Network Title LDB= SMB86, 16#20 LPS MOVB 255, SMB34 ATCH INT1, 10 AENO S M0.0, 1 LRD CRETI LPP NOT RCV VB100, 0 ****************************************************** ***in INT1*** Network 1 LD M0.0 LPS DTCH 10 AENO = Q1.0 LRD XMT VB100, 0 AENO R M0.0, 1 LPP CRETI ****************************************************** ***in INT2*** Network 1 LD SM0.0 RCV VB100, 0 END_INTERRUPT_BLOCK ************************************************************************************************************ All you need to do is to enable STL coding on your microwin instead of LAD. cut and past the above code and compile and download. NOTE: this code can also be seen as LAD, go to view, then click on LAD, then the code will be converted to LAD. The above code is only for freeport 0 if you are using s7200 -CPU 224XP. |
1/19/2010 12:11 PM | |
Posts: 101 Rating: (11) |
Try a free tool that reads/writes to RS232 port of your PC, i don't really like Hyperterminal :) Make sure your data is being delimited as well. Thank you, |
1/19/2010 12:14 PM | |
Posts: 101 Rating: (11) |
here is a free one: http://www.codeworks.it/net/VBNetRs232.htm Thanks |
Follow us on