I have a question about serial communication with a CP6606 from beckhoff. I'm working with Twincat 3 version 4022.16 in combination with Windows CE 7 compact on the HMI. I've all licenses installed.
For school I have to program a pick and place with integration of a Sick CLV 610 barcode scanner.(RS232) First I need to trigger the scanner with the string "K". Then the scanner will scan and return the scanned result. For stopping the scan, I write the string "I" to the device.
I connect my scanner on the Onboard Com1 on the CP6606. I use the following configuration in twincat 3:Config scanner. Is it fine to use RS232 or should I use RS485 to do the job? Is my emulation mode right?
I make use of 2 tasks. 1 standard task and a Fast task. The fast task places the data from the hardware in the Buffer. The standard Task processes the data from the buffer. The configuration of the fast task can be found here : FastTask
In my program for the fast task, I use this function block :FB_SerialLineControl
For sending my trigger "K" I use the following 2 function blocks:SendReceive. sSerial_SendText contains the string "K" and after the timeout of 2sec, it will take the string "I" for stopping the process.
I don't get any errors in my program. The trigger just doesn't arrive on the scanner. I cant find any Com port analyzers for Windows CE 7.0 (only 5.0 and 6.0.) It seems something is wrong with my IO config with the Com Device.
Does the runtime version affect this problem? On my PC I use twincat 3 v4022.16 (newest) and on the CP 6606 is running version 4022.2.
I tested the hardware with a program called "putty". When I press "K" on my keyboard the scanner works and displays the code in the terminal.
I did the same test with a program called "Terminal CE" (same as putty but for Windows CE"). The test was also successful, so I think that the problem is not in the hardware but rather in the software.
You can find the source files of this project on this link. https://drive.google.com/file/d/1UjvCwl1u3sF9GF553zxO4dvl6VLIRLQx/view?usp=sharing
I hope someone can help me. Thanks in advance!