Read the outgoing serial data to an IR camera

1 view (last 30 days)
Hi,
I have an infrared (IR) camera which can be operated serially. It comes with a GUI which provides various buttons to zoom in, zoom out, control brightness and contrast, display overlay etc. The protocol consists of a total 77 bytes, out of which I am concerned only with a few bits regarding zoom in and zoom out.
My question is if there is any way I can read the data that is sent on the serial port (connected to the IR camera) whenever I press a particular button (e.g. zoom in) on that GUI? I need to see that data because I need to control that camera without using that GUI (for example using MATLAB). I tried using hyper terminal but I guess only one software can connect to the COM port at one time, either hyper terminal or that GUI. Can both MATLAB and that GUI connect to the same COM port (created using a usb-to-serial converter) at the same time?
Thanks.

Accepted Answer

Vinod
Vinod on 12 Jul 2015
Edited: Vinod on 12 Jul 2015
The serial port functionality in MATLAB is "exclusive" in that only one process can communicate with the serial port - MATLAB or your application's utility.
If you are looking for port monitoring tools, you will likely need to use something that operates at the kernel level. If you are on Windows, you can try Microsoft's portmon utility to monitor the COM port traffic.
If you are interested in programmatically controlling the device, contact the vendor of the hardware and ask if they have an API to the hardware. It is usally far easier to use that than to reverse engineer the protocol by inspecting the COM port traffic.
  1 Comment
Haider Ali
Haider Ali on 13 Jul 2015
I do have an API (with minimal documentation) and it has buttons to zoom in, zoom out etc. I just wanted to 'confirm' what data is sent when a particular button is pressed. I'll try the portmon utility. Thanks!

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!