LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB - 6008 communication problem

Hi,

 

I'am a student in electrotechnical engineering, and i'am currently on a project. i've written a program in labview and in a part of the program i write an read form and to a USB-6008 interface. 

 

When i test the 6008 with the test panel in the mesurement en automation explorer everything is ok, when i test the 6008 with a self written test program to read a analog input or to write to a analog or digital port nothing is wront eigther....BUT:

 

when i use the same code to open the ports in my main program labview gives an error. Even my professor don't has got an anwser so maybe you guys can help me?

 

I've posted 4 screenshots, one of the code used to open the ports, one that show's the content of the sub vi included in the first screenshot, and two of the error code's that labview display's when runnin the program.

 

i hope someone can help me:)

Thanks!, en greetings David

 

Source Code

Sub VI

Error 1

Error 2

0 Kudos
Message 1 of 9
(2,770 Views)

Hi David,

do you work with your test program and your main program on the same pc? Maybe the Port or device is different in your main program.

 

Mike

0 Kudos
Message 2 of 9
(2,766 Views)

Hi Mike,

 

Indeed my test program and my main program are running on the same PC (my laptop). Do thanks for your quick response!

 

Greetz David

0 Kudos
Message 3 of 9
(2,757 Views)

Hi David,

can you upload your main program?

 

Mike

0 Kudos
Message 4 of 9
(2,755 Views)

Hi Mike,

 

I've created a .rar with the Vi and the requered SubVI. but where can i upload files on this forum, ( or perhaps it's more easy to mail you the rar file?)

 

David

0 Kudos
Message 5 of 9
(2,745 Views)

Hi David,

use the "Add Attachments" link. Smiley Happy

 

Mike

0 Kudos
Message 6 of 9
(2,742 Views)

Here it is,

 

there is still a part of the code not included, but the only function of that part of the code is to detect an object trough two camera's  and sent the coördinates though a TCP/IP conection to this computer, and a other part is connected to this VI trough global variables, these parts have nothing to do rearding this problem, and the main program will work without these parts. the case structure in the left upper part of the programm must be set to fase in you case because otherwise it will wait for coardinates fram the other computer that will never come.

 

greetz david

 

PS because NI does not accept rar files, you must rename the jpg to rar

0 Kudos
Message 7 of 9
(2,735 Views)

Hi David,

i think the assignment in your while loop is wrong. You should use bundle by name inside the subvi and use different names for your task. At the moment you use the same task three times. It will also work if you change the unbundle by name function in your while loop to only unbundle, but i think it's better to change it all to ... by names.

 

Mike

Message Edited by MikeS81 on 01-08-2009 02:54 PM
Message 8 of 9
(2,723 Views)

Hi Mike,

 

I will change it right away, (strange that my proffesor didn't noticed it) i thought it wasn't nessesery to name the task s because de secuence of bundle / unbundle is the same. when i have results i'll be online again!

 

David

0 Kudos
Message 9 of 9
(2,720 Views)