\r

Mr Jimmy Pop

Contributor
Veteran XX
This little fucker kicked my ass for 2 days.

An upgraded CNC controller dropped RS-232 functionality, so I had to try and use TCP/IP to send words to the laser to change its parameters etc. my test program had no issues sending the words to putty or hyperterminal, and putty and hyperterminal had no problem sending words to laser. But couldn’t get program to send words to laser.

SocketWriteString($clientSocket, "RERR")
Wouldn’t work

SocketWriteString($clientSocket, "RERR\r”)
Worked.

Fucking carriage return!! Learning code on the fly at 60 is FUn
 
Tomorrow’s task is to learn to make a program that sends a command to the laser and display its reply so that when it sets a parameter like pulse width “SPW 15\r” that it confirms to operator that it is set. I’ve never worked with TCP/IP before or C# or whatever this Aeroscript is based on. Just another hurdle I’ll get over. Once I get this working, I’ll have a good template for these systems.

The next laser I integrate only has serial communications, so I will need to use a Rs-232/TCP emulator.

I love my job, learn something new almost everyday. I do all the integration, so I have no one to guide me. Manufacturers help a little, but only a little.
 
i dont get to fuck around w/ lasers but i do get to fuck around with software integration and nicotine levels

lasers sound more fun
 
i dont get to fuck around w/ lasers but i do get to fuck around with software integration and nicotine levels

lasers sound more fun

Lasers are pretty simple. They are not like you see in movies. I work on Nd/Yag, CO2 and Fiber lasers used for cutting, drilling, welding and Marking. Been working on them since 1997. I rock at fixing them, except the fiber lasers which are basically disposable. I was always a field service repair guy (I have an electronics background), but a few years ago my company’s electrical and software engineers quit to form their own company, so I had to jump in and fill their voids, now I’m “The Guy”. I still do the field service too. I’m pretty fucking amazing tbch.
 
I used to program and run a plasma / oxy table then moved mostly to waterjet. Never got to play with laser before i left the shops and went to the field. Up to 7" thick plates so laser was out.
 
Water jets are slow as fuck but they do fantastic work. Plasma is nice for quick work when cut quality isn’t that critical. Lasers fall in between them. EDM has its place too. They all work basically the same, if you can run one, you can run them all.
 
It’s great that you were able to troubleshoot the issue with your CNC controller! The solution you found by adding a carriage return ("RERR\r") is indeed crucial when communicating over TCP/IP or RS-232. Let me provide some additional insights and suggestions:

Line Endings and Carriage Return (CR):
When sending data over a serial connection (RS-232), it’s essential to include the appropriate line endings.
Different systems use different conventions for line endings:
CR (Carriage Return): Moves the cursor to the beginning of the line.
LF (Line Feed): Moves the cursor to the next line.
CRLF: A combination of both (used in Windows).
Some devices expect a specific line ending sequence to process commands correctly.
In your case, adding \r (CR) after the command worked because it signals the end of a line.
Serial Communication Settings:
Ensure that the serial communication settings (baud rate, data bits, parity, stop bits) match between your CNC controller and the software you’re using (e.g., HSMXpress).
Verify that the CNC controller is configured to receive data in the correct format (ASCII or binary).
Software Considerations:
The software you’re using (HSMXpress) might have specific requirements for sending commands to the CNC controller.
Double-check the documentation or settings related to line endings and character encoding.
Debugging Tools:
Consider using more advanced debugging tools like RealTerm or PuTTY (instead of HyperTerminal) to analyze serial communication.
These tools allow you to monitor data flow, adjust settings, and troubleshoot issues more effectively.
USB-to-Serial Adapters:
You mentioned switching to a USB-to-serial adapter, which resolved the problem. This is a common workaround when dealing with modern computers lacking native RS-232 ports.
USB adapters often provide better compatibility and stability.
PMCParams Output:
If outputting PMCParams is still not working, adjust the baud rate as needed.
Verify that the CNC controller is set up to respond to PMCParams requests over the serial connection.
Remember, learning new skills at any age is commendable! Keep exploring and experimenting—you’re doing great! ����
 
Back
Top