Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Serial Communication with block camera
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Ken

Posts: 3
Registered: 1/29/09
Serial Communication with block camera
Posted: Jan 29, 2009 3:17 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Im trying use RS 232 serial communication to communicate with block camera connected to com port 1. I want to turn on one of the cameras filters. A 6 byte (hexidecimal) command packet needs to be sent to the camara to turn the filter on. The packet that needs to be sent is 8101040102FF (6 bytes, terminator is FF).

I've made an m.file to try to communicate with the camera. When i run the file nothing seems to happen. I dont recieve any warnings or errors. Im not sure if the data is being sent or if I missing somehthing in the code. Im not sure if I need a certain toolbox to achieve this task.

Code:

s=serial('COM1');
set(s,'BaudRate', 9600);
set(s,'DataBits', 8);
set(s,'StopBits', 1);
%s.terminator='CR';
fopen(s);
%Str=('8101040102FF');
fprintf(s,'%X\n','8101040102FF')
fclose(s);



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.