LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display image in Labview

Dear all!
 
Would you like to help me, it's urgent! Thanks a lot.
 
I have a trouble when inserting pictures into Labview front panel.  I write Labview to simulate like a racing car game, using DAQ kit, PCI 6259.
 
The program is ok. But, at first, I set the position for 2 cars according to the origin cordinate (0,0), eg. car1: (800,350) (for right side), car2:  (700,350) (for left side).  When I'm starting on the right side, it keeps the initial set position:  (800,350) of car 1. after that, I turn left, and the car2's position is (0,0).
 
If I started on the left side, it also like that. This means that the car 2 will be kept the initial set position: (700, 350), after turning right, the position of car 1 at this time is (0,0).
 
I have aldready checked, reseted position values after each loop and set again for 2 car positions. So, it can not run.
 
This is a simple program, just you while loop and if else condition.
 
Please help me, it's important for me in this month.
 
Thank you for your help. Hope to be replied soon!
 
Best regards.
 
 
 
 
0 Kudos
Message 1 of 7
(3,268 Views)
Your description is a bit confusing. How does your program set the new position?
 
Do you use shift registers to keep track of the current positions of the two cars? Could it be that they are not wired across in all cases of a case- or event structure? (look for shaded output tunnels).
0 Kudos
Message 2 of 7
(3,265 Views)

Thank you for your reply!

I already used shift registers to keep track of the current positions of the two cars. I also checked with all wires.

I used the formula node to write the condition for chosing case structures. So, when I call, e.g the right side, I also call the set position of car 1. Same with the left side, I called the initial position of car 2 as long as the left side.  

What I want that after I turn left or right, the position of each car will be initially set, Car 1 (800,350), car 2 (700,350)

Thanks for your advise!

Best regards,

 

0 Kudos
Message 3 of 7
(3,257 Views)
I would recommend that you attach your VI. It is impossible to troubleshoot without seeing the code. Really!
Message 4 of 7
(3,250 Views)
"
Please help me, it's important for me in this month.
"
 
If it is important, then please follow the advise offered by Christian and post your code.
 
We are 1000 X more effective when we have code to look at!
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 7
(3,231 Views)

Thank you for your help! But now, I already fixed this problem. Because I forgot to connect wires for 1 of cases.

Now, I would like to ask how can I put the sound in the VI. Please, see the attached file, it only can run with 1 sound file. If I want to run 2 sound files in 2 cases, it has an error. Please help me!

Thank in advance! See you reply soon.

Best regards,

Message Edited by Tuong on 03-10-2006 02:39 AM

Message Edited by Tuong on 03-10-2006 02:40 AM

0 Kudos
Message 6 of 7
(3,209 Views)
Look at your code! You set "wait until complete" to false and you don't have any wait statement in the loop. Basically, you are trying to play the same file over and over, millions of times per second while it is already playing.
 
Set "wait until complete" to TRUE and it will behave more normally.
Message 7 of 7
(3,190 Views)