Is it possible to plug and play microcontroller to labview? While the VI is running with some task, I want to plug my microcontroller through serial com and read it on front panel automatically without configuring "visa resource name" first and interrupting the running VI. Is it possible?
Yes, it is possible. Kind of a pain to do. First you have to detect which COM ports are available (Find VISA Resources) and then go through each one with the known serial port settings and check the communications until you find one that works. Since you are dealing with a microcontroller, you can make life a little easier by making sure there is some command that the computer can send to have the microcontroller identify itself (a simple loop back command would do it). Once you determine you have communications set up, you can continue with normal operation.
I've tried VISA Find Resource and it run successfully if my usb-to-ttl already plugged in. If there is no COM port available it always return error.
Do you have some reading reference that maybe can help me?
You are expecting it to return an error if itcannot find the correct COM port so this should all be part of the plan. All you will need to do now is discard that error.
If you know the specific error that you will always get back if you are missing the port then you can use "Error Clear" with a specific value and work off the boolean output from it. If you get a range of errors (you probably shouldn't) then you can just clear all the errors and trigger your "TTL found" case with something else.