MATLAB: How to identify a sensor in Matlab via the Universal Serial Bus? or how to use visa

keyenceusbvisa

My problem is this; I have a keyence laser displacement sensor. My computer is defining with universal serial bus. The sensor doesn't recognize with serial com port. i know with define com port in matlab. but I do not know how to get universal serial port in matlab. i want to define the sensor with universal serial bus in matlab. Thank you for you help.

Best Answer

It would help if you indicated which model of Keyence sensor you are using, so that we can be sure we are referring to the correct manual.
For RS232, were you using one of the official RS232 cables? There is no real standard for ending RS232 cables with RJ45 connectors, so it can be important to use their cable (or be good at building your own cable.)
When you say that the sensor does not recognize the serial com port, could you expand on that? What software were you using to connect to the COM port, and what settings for the port?
When I look through the Keyence web site, the devices that have the USB interface appear to be only in the LK series (but I might have missed something.) I read through the LK-G5000 manual, but it says nothing at all about what kind of device it will show up as being -- it does not for example say that it will show up as a virtual serial port. But it might... no information is given.
The LK-G5000 also has an ethernet connector; ethernet might be easier than USB.
MATLAB does not have very much support for USB directly (almost none.) If the device does not show up as a serial port, you will probably not be able to connect to it -- not unless Keyence provides drivers to connect.
Note: you may need to install any Keyence-provided interface software (and possibly reboot) before the device shows up for USB.
You asked about VISA. VISA is a protocol that runs over GPIB (General Purpose Interface Bus) cables, which are 24 pin cables. The LK-G5000 for one does not have a GPIB interface and therefor cannot be used for VISA. We need to know the model you are using.