Hi Dave,
Under the covers, the library will keep trying, but if you use the synchronous mode when calling plc_tag_create(), it will fail after your timeout. If you use the asynchronous mode, you are responsible for managing the timeout. Once you have a timeout, you need to call plc_tag_destroy() in order to stop the back end of the library. If you use the synchronous mode (passing a timeout value > 0) for plc_tag_create() you will not need to call plc_tag_destroy() as that will happen when the tag creation fails with a timeout.
Unfortunately, there is no way for the library to tell the difference between a data entry error and a PLC that is temporarily off line. So it will just keep trying unless you tell it (via a timeout value or via a call to plc_tag_destroy()) to stop.
How is LabVIEW calling plc_tag_create()? Is a timeout value passed or zero?
Do you have access to the command line tools? You can try using tag_rw2 to access a tag on that PLC to see if the library is hanging without being called within LabVIEW. That will test whether there is a fundamental problem on your system when the wrong IP is entered. Here is what I see when I enter an IP address that is not a valid one:
./tag_rw2 --type=sint32 '--tag=protocol=ab-eip&gateway=10.206.1.34&path=1,4&plc=ControlLogix&name=TestDINTArray[0]'
Library version 2.4.1.
Processing argument 1 "--type=sint32".
Processing argument 2 "--tag=protocol=ab-eip&gateway=10.206.1.34&path=1,4&plc=ControlLogix&name=TestDINTArray[0]".
ERROR: Error creating tag PLCTAG_ERR_TIMEOUT!
Now when I try again with a valid address:
./tag_rw2 --type=sint32 '--tag=protocol=ab-eip&gateway=10.206.1.40&path=1,4&plc=ControlLogix&name=TestDINTArray[0]'
Library version 2.4.1.
Processing argument 1 "--type=sint32".
Processing argument 2 "--tag=protocol=ab-eip&gateway=10.206.1.40&path=1,4&plc=ControlLogix&name=TestDINTArray[0]".
data[0]=10 (a)
I see the data then.
If you can test from the same PC that runs LabVIEW we can remove other factors from the hang.
Best,
Kyle