8
$\begingroup$

(I'm using Windows 7 & Mathematica 10)

I have a sensor with RS232 serial interface. The sensor came with a RS232-to-USB converter and corresponding driver & software for data transportation. Now I want to retrieve the data from the sensor manually with Mathematica. FindDevices could not find the device, but it does appear in the Device Manager in Windows under the name "USB Serial Converter". So how can I connect to the sensor? Thanks

$\endgroup$
  • $\begingroup$ Does this help at all? (I have no idea, just a wild guess.) Maybe the fact that FindDevices doesn't return it shouldn't be taken as an absolute "no"... $\endgroup$ – Szabolcs Jul 7 '15 at 8:20
  • $\begingroup$ @Szabolcs I tried DeviceOpen["Serial", "COM1"], it could be opened but can't be read ($TimeOut). I think it's my other device, though. Thanks for the information! $\endgroup$ – arax Jul 7 '15 at 9:06
5
$\begingroup$

I also have a USB to RS232 converter connected to my machine (Windows 7 Mathematica 10). I don't have any RS232 device (The RS232 connector is left unconnected).

I have done successfully the following test : After connecting the receive and transmit pin together (pin 2 and 3, either valid for 9 pins connector or 25 pins connector), send and receive a message from/to Mathematica.

enter image description here

In this test, there is no need to adjust the Baud rate, the data bits length and the stop bits because they are always identical for the receiver and the transmitter of the same port.

Note that there is some documentation about RS232 in Mathematica help (look for "serial").

| improve this answer | |
$\endgroup$
  • $\begingroup$ One can use DeviceReadList[dev, 5, "String"] instead of FromCharacterCode /@ DeviceReadList[dev, 5] $\endgroup$ – andre314 Jul 7 '15 at 20:10
0
$\begingroup$

plug usb and use from

ControllerInformation[]

you can see any device that plugged into your system with usb.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.