RS485-USB adapter, automatic reconnection after its extraction-connection.

Hello, I transfer data from my microcontroller to the PC (based on windows) through the MODBU driver that comes in IWS, I updated the driver to the latest version. The connection is through a usb-rs485 key, the issue is that if the adapter is accidentally disconnected and reconnected, the connection does not recover, I have to restart the driver. From LabView, I have a way to retrieve it, but from IWS, I don't know how to do it.

Please, is there a way to be able to recover automatically, maybe through some visual basic script?

Could you help me with this, please. Thank you very much.

Regards,
Fernando.
  • I do not know if this will help in your situation, but you can use the following to check if the driver is running, stop the driver and start the driver.
    $IsTaskRunning("DriverMODBU")
    $EndTask("DriverMODBU")
    $Exec($GetProductPath()+"Bin\Studio Manager.exe "+ $Asc2Str(34) + $GetProductPath() + "Bin\Driver.dll" + $Asc2Str(34) +" MODBU")
  • Hello,

    Goodnight,

    Thank you very much for the quick answer.
    I will try with the recommendations that you have given me, and I will comment on the results, if I find the solution, I will publish how I did it.

    Many thanks.

    Fernando.