This is the code I have created to test and see if I can receive any measured values from the Keyence Ls, 7030 laser micrometer. Currently, there is a signal being received to the Arduino and saying that the serial is available, but no values are coming through. The serial monitor reading is:
M0,1e
M0,1,
Available
M0,1,
Available
M0,1,
Available
M0,1,
Available
M0,1,
Available
M0,1,
Available
M0,1,
Available
You are sending the byte you received from Serial1, which I presume is the micrometer back to the micrometer. Instead to the serial monitor window.
So it should be:-
Do you know the format of the response, so you could read until some end marker?
Or you could read as long as data is available and print that to the monitor (for now), and stop that when, say, 500 ms went by with nothing available.
Another thing you can always do is to start by talking to the device just using PuTTY or CoolTerm or other terminal emulator program, direct from the PC, no code, no Arduino.
No it was giving back no values at all. Also I was able to implement some new pieces to the code that is sending some numbers, but the are still not correct.