01-08-2009 05:20 AM
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
01-08-2009 05:51 AM
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
01-08-2009 06:21 AM
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
01-08-2009 06:34 AM
Hi David,
can you upload your main program?
Mike
01-08-2009 07:16 AM
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
01-08-2009 07:23 AM
Hi David,
use the "Add Attachments" link.
Mike
01-08-2009 07:32 AM
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
01-08-2009 07:53 AM - edited 01-08-2009 07:54 AM
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
01-08-2009 07:57 AM
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