08-13-2024 04:38 PM
Hello!
I have a Perle IOLAN serial to ethernet converter and I'm struggling to establish a connection with my serial RS232 device. When the device is connected directly to the RS232 adapter in my PC, everything works great using VISA, so I know the commands sent to the device are valid and the device is responding properly.
I tried two approaches. First, I use Perle TruePort software, which creates a COM port so in principle VISA VIs should work. In this case I immediately get the "The resource is valid, but VISA cannot currently access it." I made sure nothing except NI MAX is accessing it but I still get this error. Second, I tried adding a new VISA TCP/IP resource in NI MAX. I set up the IP and the port and when validating it, I get a "Successfully opened a VISA session to..." message. Great! Then I open the VISA Test Panel, write a command, which results in no errors, however I do see that the device did not switch into the "remote" mode. The read then always times out with the error 56.
I would greatly appreciate any recommendation on what to try next because I'm honestly completely out of ideas at this point.
08-13-2024 05:46 PM
I'm ashamed to share that the pin mapping on my DB9 was incorrect, which fixed the issue of communicating over a virtual port with VISA VIs. The TCP/IP still doesn't work for whatever reason, so I'd be interested in knowing how to fix that too, but at least I can work with my device now.
08-14-2024 08:48 AM
Don't be ashamed, things happen and now you learned !
Check the serial port configuration to see it matches your device (baud rate, stop bits, etc).
If still doesn't work, t ry creating a loop between pins 2 and 3 (tx and rx) on the serial port of the Perle IOLAN and remove your device out of the picture (just during troubleshooting).
then send a message and see if you can read it back to check if the device is working properly.