取消
显示结果 
搜索替代 
您的意思是: 

Make auto connection to machine through USB

已解决!
转到解答

Hi, 

 

I am working on a midi Logger GL240, below is the zip file that provided by manufacturer, however, I am trying to edit its setting so that the connectivity to the hardware will be automated once the program is started. May I know how can I do so? I realized that they created their own Type Definition Control and I supposed changes should be made from there? The USB ID is 0 by default from the hardware. 

 

The DLL file is in 32-bit, hence it is a must to have 32-bit LabView running to able to run the VIs. 

Hope to get help and reply ASAP. 

 

Thank you. 

Best regards, 

Wing

0 项奖励
1 条消息(共 7 条)
2,434 次查看
解答
已被主题作者 wing98 接受

I am not sure I am understanding what your problem is. My understanding is you are trying to modify the Utility_Main.vi so that you basically run the the connect event when the code first starts up

 

 

If this is correct you should move the code that connects to the USB instrument outside of the event structure so it is performed straight away. See below.

 

USB.png

 

0 项奖励
2 条消息(共 7 条)
2,400 次查看

Dear Niatross, 

 

Thanks for your reply. I tried the way you suggested, it can be connect but it is possible if I don't want to have the popup message and wanting me to click the button connect? I would like to have it connect directly once I run the program. 

 

Hope to hear from you soon. 
Thank you. 

 

Best regards, 

Wing

0 项奖励
3 条消息(共 7 条)
2,393 次查看

Ah. I didn’t look that closely at how those vi’s work. 

by the looks of it they have put untility_main together as an example of how to use the ire code (the green not white vi’s) 

 

If you want to significantly move away from their example I would rewrite it using the green vi’s shown in the vi tree. 

a good idea anyway because in my opinion what they have done isn’t the best example of how to do things. No error handling of any sort for example. 

if you want a quick solution recreate that connect vi so it performs the action in the connect case automatically. 

0 项奖励
4 条消息(共 7 条)
2,377 次查看

Hi Niatross, 

 

Thanks for your answers, I am able to make it auto connect by changing the subVI to Open USB Driver and assign the USB ID in advance as shown in the figure 1 (Left side). 

I am now looking on how to write data received to the network variable. I am able to send data to the variable under "CommandLine": Value Change -> SubVI CommandLine -> Added the WRITE network variable to the data output of R/W Driver as shown in the figure 2. 

I followed the SubVI CommandLine to the R/W Driver for data input and output as shown in Figure 1 in Main, but sadly that I am not getting the results from Main VI. May I know how to solve this problem?? 

 

Thank you. 

 

Best regards, 
Wing

 

wing98_0-1609343672654.png

wing98_1-1609343923938.png

 

 

0 项奖励
5 条消息(共 7 条)
2,342 次查看

This may not be related but,  have you changed the OS power management settings to keep the USB port from being powered off?

 

I know, it seems silly, but a USB port without 5v makes about as much sense as a submarine with a screendoor.  Sometimes you have to ask the question 🤬


"Should be" isn't "Is" -Jay
0 项奖励
6 条消息(共 7 条)
2,328 次查看

Can you attach your code so far rather than pictures

0 项奖励
7 条消息(共 7 条)
2,307 次查看