Posted 25 May 2005 hello all i have create my visual basic program to send some character to the rs232 port built in cpu but the character that i have send to plc not all of them can receive by plc even the end of charater in visual basic to be strt charater (ascii) in the d188 e.g: "012301" in visual basic but in the d188... 313031323330 first time send d188... 303130313233 second send d188... 303130313233 3times send d188... 323330313031 4times send d188... 303132333031 5times send this is my mnemonic LDNOT 25.14 ORNOT 25.15 RXD(235) D188 #0 &6 i have setting the pc setup and then make it same for my visual basic program regard ARK Share this post Link to post Share on other sites
Posted 25 May 2005 Add a CR (0D) character to your VB string. Then setup the RS232 port to have an end character of 0D. Then change the ladder to be: LD A392.06 RXD(235) D188 #0 A393 See eample below: TXD_RXD_CSCJ.cxp Share this post Link to post Share on other sites
Posted 25 May 2005 thanx alot mr.jay and i will try but now i have some confuse for interrupts when my plc receive some character from the visual basic my plc have to take interrupt for working. i confuse abt interrupt in CS plc, some manual i have read is not make me understand at all, so could u give me some example abt interrupt specially like my case above thanx regard Share this post Link to post Share on other sites
Posted 25 May 2005 Interrupts only work for serial ports with CS1W-SCU21-V1 Serial Communication Unit Modules. Just use A392.06 for a trigger when something is received into the CPU RS232 port. Share this post Link to post Share on other sites
Posted 25 May 2005 thats mean received bytes have to increase 2 bytes thanx regard Share this post Link to post Share on other sites
Posted 26 May 2005 I personally do not think it is worth it to have a serial interrupt when CS1 scan times should be in the 2-3ms range. You are making it way to hard when it's really simple. Anybody else have an opinion? Share this post Link to post Share on other sites