LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

(Serial communication)port disconnected while reading and writing data

HI,

       I am making an interface with ATMEL8U to write data and get data from it. i taken the general example interface from Labview. Given example is working perfectly but when the process is going in Labview, I just reset my controller or plucked the USB. in that it pop-up the meaasge with error. See the attchment for more information. My system is always depends on the microcontroller. In that i want to give a pop-up message for the user that is the cause for port reset. How can i do that. 

0 Kudos
Message 1 of 6
(3,660 Views)

Kindly explain in a more detail what your trying to do.. what type of communication your using serial or USB. You can add screen shots directly so no need to add word files. We will be more interested in your Block diagram then front panel.In the block digram in functions see programming>dialog and user interface may be you will get an idea.

Naqqash
0 Kudos
Message 2 of 6
(3,653 Views)

You will need your application to watch for and handle error conditions. Part of that processing would allow you to reestablish the connection when teh resource is available again. You might want to consider using a state machine to handle your connection.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 6
(3,649 Views)

If i disconnect the allready connected USB when the attched VI is running continuously. that time i got the error as i shown previously, i need to overcome that by displaying a message or is there any other way. Please tell me in clear way because i am totally new to labview and programinng terminalogy.

0 Kudos
Message 4 of 6
(3,640 Views)

Hello,

           It seems very difficult to post user message when ever my USB lost. I tried to put User dialog box at the end of communication. But it is showing the message every time. Please help me in way that whenever USB is lost, i want to display a message that "Usb lost or connect useb in same port". Also in that case i dont want to display any predifined message by labview with error code.

           more if USB lost then i dont want to write any message to Micro controller and also it can able to notice that USB is lost to send messages.

 

                                   See the attchments for VI.

0 Kudos
Message 5 of 6
(3,598 Views)

The random event structure in the loop is preventing the loop from running. There is no timeout value set and therefore the code is waiting for an event. However, you do not process any events and so the loop is stuck waiting. The way the code is written now is a very poor architecture. Generally you do not want processing outside of the event structure in the loop when you use one. The exception is a basic update of a control or indicator. However you want to avoid general processing.

 

I recommend you look at the examples for state machines. This will allow you to control the flow of your application better.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 6
(3,586 Views)