OK, so it compiles, next is to do the simplest test (probably would have done that first). I don't have your hardware obviously, but I would start with something as simple as possible that should test the connection.
If this does work, then put TextWindow.WriteLine debug statements in your code to debug further.
If this doesn't work, then check the port, baudrate command and documentation (parity etc) for the hardware, and any return error messages.
Code:
result = LDCommPort.AvailablePorts()
TextWindow.WriteLine(result)
result = LDCommPort.OpenPort("COM5",115200)
TextWindow.WriteLine(result)
result = LDCommPort.SetEncoding("ASCII")
TextWindow.WriteLine(result)
result = LDCommPort.TXString("<t 3 50 1>")
TextWindow.WriteLine(result)
If this does work, then put TextWindow.WriteLine debug statements in your code to debug further.
If this doesn't work, then check the port, baudrate command and documentation (parity etc) for the hardware, and any return error messages.