Jump to content

RS232 Communication


RyanR

Recommended Posts

I am trying to control an "Analogue Modules: Laser Flashlamp Controller" through RS232. The attached manual contains the "serial interface specifications" but typing commands in exactly as stated does not produce the desired results. As seen on page 13 of the manual (15 for the pdf) the command format is:

$name ##cr

I have tried sending my commands in the "Basic Serial Read and Write" vi and in NI MAX by going to the COM port my device is in and clicking "communicate with instrument" and typing commands in the "send string" box and pressing "query". This device is rather dangerous so I have been trying the non operational commands such as reading parameters and changing settings, but never trying to run the device. I have had no luck with either. Two commands I have tried are:

$MODE ?cr

$MODE 4cr

and variations of them:

$mode ?cr

$mode ?0Dh

...etc...

There have been a couple of issues that lead me to believe sending and receiving are happening, but I am just not giving the device commands it understands. For instance:

Page 14 of the manual states "AMI" is emitted after start up until the device receives a $. When I turn the device on I receive AMI multiple times in the "read string" of the above stated methods for communicating , but once I type a command (such as the ones above) with a $ as the leading character it stops reading AMI.

Another reason is that upon start up, the device displays a caution message until a button is pressed (or apparently a command is sent via RS232) - see the bottom of page 3 in the manual. When I send the first command to the device it has the same effect as pressing a button in that it clears the caution message and brings me to the main menu.

9600 baud, 8 bits, parity=none, and 1 stop bit have been selected as stated in the manual.

I am not good with RS232 command protocol, and I have had the issue before that the proper command display format is necessary - e.g "Normal Display", " \ Codes Display", "Password Display", and "Hex Display". Also, I believe sometimes the cr (and other parts) of the "$name ##cr" actually stand for something else (e.g. \n\r) and that is what is suppose to be sent - not the cr itself. Does this sound familiar to anyone?

Thanks for any help.

Link to comment

Sorry, here's the manual.

I tried using the string "$MODE ?\n" which "\ display" format changes to "$MODE\s?\n" and selected the "query" button, but it just reads the same string back to me: "$MODE ?" I tried without the space and got (without the space) the samething "$MODE?"

$SCALE ?\r

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.