I dont see any help in the datasheet (if you can call it that) regarding voltage ranges.The device can communicate using its RS232 cable baud:19200 bits: 7 Parity: even Stop bits: 1 Were using the following hardware: a leonardo and using the hardware serial.
When we use HyperTerminal to send a command s0o (to turn the laser on for example). We go to settings within HyperTerminal and select a tick box Send line ends with line feeds. Ok, so by sending commands through hyperterminal we can control the laser. Now we want to send the commands by hardware serial of the leonardo to the laser. First we decided to make sure we had our communication setup by essentially making a circle of communication, Ill explain. PC com port 1 to arduino 2. We then use the Serial Monitor to act as the monitor for port 1 6. I type in any random text into the serial monitor, press enter and it appears over in HyperTerminal monitor 2. ![]() We now go and remove the RS232 cable from our loop and plug the laser in its place. At this point we were thinking it was related to the line ending character. So we went to Serial Monitor and tried all the line ending options. Hyperterminal Commands Rs232 Manual Which MayHere is a quote from the user manual which may be of interest. Hyperterminal Commands Rs232 Code Such ThatTaking the above quote and the tickbox from HyperTerminal into account (Send line ends with line feeds), I changed the code such that it sends the following: Serial1.write(s0orn); Still not working. Can anyone confirm if Send line ends with line feeds simply means the n (newline) code or is there yet another code called line ends which I am not aware of How to denote a line ends in code So if anyone knows of something which I am obviously missing, I would very much like to know. So to turn the laser on I type: s0o wildbill, you are correct, the quotation was a typo. There is supposed to be a response every time I tell it to turn on or off. I dont receive this response when using the arduino but I do recieve the response when using the HyperTerminal. Hyperterminal Commands Rs232 Software Engineer ByElectronics engineer by trade, software engineer by profession. Ive tried putting a n at the end, a r at the end, a n at the start and r at the start and a whole heap more permutations. PaulS - I have also tried using write and print The latest I tried was write them in DEC. Ok, I have noticed something, Im not sure if it is proper function of ther RS232 shield, I doubt it. The MAX232 chip on the shield gets very hot (I burnt my finger) when plugged it into the laser. The power used for the laser is 10V 0.2A. It is noticeably cooler when I have a serial to usb cable plugged in when making a communication circle as described in the original post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |