LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing same Lib at the same time

Solved!
Go to solution

I have 2 bluetooth sensors that provide me with data. I am constantly checking the connection status of both sensors with a SubVI. However when one sensor isn't connected the SubVI checking the status takes about 10 sec to execute. That long of an execution time blocks the other sensor from providing me with data. Is it because they share the same SubVI or the same library or both?

0 Kudos
Message 1 of 13
(1,475 Views)
Solution
Accepted by topic author mikoborn

Hi mikoborn,

 


@mikoborn wrote:

However when one sensor isn't connected the SubVI checking the status takes about 10 sec to execute. … Is it because they share the same SubVI or the same library or both?


  • That 10s is the typical default timeout for communication connections. You can set a smaller timeout when initializing the communication channel…
  • When the subVI is NOT set to reentrant then there is only one instance in memory and you cannot run it twice in parallel. So when one device is not responding the subVI will wait for the timeout duration and so block the other execution…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(1,468 Views)

Setting the VI to reentrant was exactly what I was looking for. Didn't expect such an easy fix, thank you!! I had a look into the initialize VI, however is used libraries I don't really know how to access. Do you have a suggestion on how to access them? I have also tried to abort the VI that is checking for the connection status after a certain time without an answer, however I couldn't think of an eay way and it got way too complicated and ended in a mess.

0 Kudos
Message 3 of 13
(1,441 Views)

Hi mikoborn,

 


@mikoborn wrote:

I had a look into the initialize VI, however is used libraries I don't really know how to access. Do you have a suggestion on how to access them?


Unfortunately I don't use the latest LabVIEW version(s) so I cannot open your VI.

You would get better/more/faster answers if you would downconvert your VI to LV2021 or LV2019: File->Save for previous…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(1,410 Views)

Thank you for that information, I will keep that in mind for further questions. However there is some problem I am unaware of on how to fix at this point, which doesn't allow me to save the file to a previous version. The library I am accessing is a dll file. I did some reasearch and it seems to be quite challenging to edit a dll file to ones desired needs. Are there any suggestions on how to do so?

0 Kudos
Message 5 of 13
(1,373 Views)

Hi mikoborn,

 


@mikoborn wrote:

However there is some problem I am unaware of on how to fix at this point, which doesn't allow me to save the file to a previous version. The library I am accessing is a dll file. I did some reasearch and it seems to be quite challenging to edit a dll file to ones desired needs. Are there any suggestions on how to do so?


Why does the DLL doesn't allow you to downconvert your VI?

And why do you want to "edit" the DLL?

 

To answer your question: to "edit" the DLL you need to change it's source code and (re)compile the DLL...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(1,366 Views)

Nevermind it seems to work now. My thought was to edit the dll because the dll is where the timeout duration is defined?

0 Kudos
Message 7 of 13
(1,337 Views)

Hi mikoborn,

 

unfortunately your VI is missing all its subVIs, usually found in a sub-folder named "LLD"…

 


@mikoborn wrote:

My thought was to edit the dll because the dll is where the timeout duration is defined?


Where does that DLL come from? (From what I see in your VI I guess it's a dotNET component…)

How do you start/init the communication channel?

Which parameters are set within the "BLE_Initialize.vi"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(1,325 Views)

You are absolutely correct, the attached SubVIs are LabVIEW v19

0 Kudos
Message 9 of 13
(1,310 Views)
0 Kudos
Message 10 of 13
(1,309 Views)