Since version 2.3/2.4, DAVID is able to send/receive commands to/from external devices using a (virtual) COM port. This feature is meant for e.g. moving the laser by a controller-driven stepper motor or for remotely controlling DAVID.
Open the Advanced Settings, navigate to Communication→COM and set the value PortName to the name of your COM port, e.g. COM1.
DAVID will send short messages (as text - string or single character) in certain situations. You can define what to send in the Advanced Settings under Communication→COM→Messages.
You can set the value Newline if you want DAVID to append a certain character to each message (e.g. Byte value 10 for Line Feedback, 13 for Carriage Return, etc., see any ASCII table). Please note: This setting is different from the above “Message” settings. When you enter “13” here, DAVID will append a single byte (value 13). When you enter “13” in one of the Message settings above, DAVID will send two bytes: “1” (ASCII code 49) and “3” (ASCII code 51).
Additionally you can include a “\r” in the Message strings; each \r will be replaced by the newline character.
As a simple alternative, you can use the DTR pin as a boolean output.
If you set UseDtrDuringScan to 1, DAVID will set the pin high when scanning starts and low on stop.
If you set the value to 2, DAVID will send a rect signal synchronized to image grabbing and analysis.
You can e.g. make a step with your laser motor each time the signal goes up. Please note that the moment the pin goes low is when DAVID grabs the latest image, not when the camera sensor is actually exposed.
To synchronize laser steps and camera images, you may want to set a delay in Laserscanner→MinDelayBetweenFrames and set Laserscanner→LaserPlaneCalculation→LaserMotionEstimation→MotionBase to 2.
To control DAVID remotely, you can send string commands.
This works only on the scan page, when the camera is correctly calibrated!
The commands are defined in the Advanced Settings under Communication→COM→Commands.
See the description there for details.
Note: You must send a newline (\n or \r, resp. byte 10 or 13) after every command!
Furthermore, if you set the value ScanWhenDcdIsHigh to True, DAVID will start scanning when it receives a positive signal on the DCD pin, and stop when the signal gets negative.