LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout on COM port

Solved!
Go to solution
I have two ModBus vi's which I have combined into one in order to avoid two separate vi's running at the same time and both requiring the COM port. I've taken the beginners approach and created a sub vi for each and then called them in a new vi. Amazingly, one of the sub vi's actually runs, but the other gives a timeout error. Can anyone tell me a better approach please ? I've attached the vi for viewing. Many thanks !
0 Kudos
Message 1 of 7
(3,039 Views)

You haven't attached any subvi's, what you have attached will not run.

 

Rgs,

 

Lucither.

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 2 of 7
(3,018 Views)

Hi placebo,

  Probably you are using same com port for both serial write functions or one of the com port in your system is inactive.Please add subvis also.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 3 of 7
(3,013 Views)
Sorry about that. I've attached a Zip file with all the dependencies. Thanks for your time.
0 Kudos
Message 4 of 7
(2,996 Views)

Hi,

As srikrishnaNF said you are trying to accses the same COM port at two different places at same time.

To avoid the error Run the vis sequentially by connecting the error out put from vi1 to the vi2.

 

Also you can use semaphore  If you want to run both the vis independently.

Message 5 of 7
(2,980 Views)
Solution
Accepted by topic author Placebo

Hi all,

 

G K is correct. Connecting the error line through the VI's in the order that they need to be ran is the way to go.

 

 

Although, as G K said semaphore's are also a good alternative: http://zone.ni.com/reference/en-XX/help/371361G-01/glang/semaphore_vis/

Kind Regards

Michael
NIUK Application Engineer
Message 6 of 7
(2,971 Views)

Thank you. I've modified the vi and now the stepper routine will run once, but the power reading routine not at all. It was the other way round before. I need to set the vi to run continuously so that as I develop the vi more, the power readings will provide the input to the stepper routine. I'm sure I've made a novice mistake in connecting the error wire. I'd prefer to pursue this in preference to the semaphore for the time being.

 

Are you able to point out my error ? Many thanks !

0 Kudos
Message 7 of 7
(2,939 Views)