LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switch from true to false continuously

Hi,
     I need find a way to shift from true to false every second continuously. I have looked at the posts discussing the shift registers, but i can not make them work. To test if it works i am simply trying to blink and led. Please help.
 
thanks,
Alex
0 Kudos
Message 1 of 6
(4,766 Views)
hai
just run this,,it will blink every 1 sec.
 
LV 8.2.1
0 Kudos
Message 2 of 6
(4,758 Views)
rajkumar.r 's vi works fine, but the timing is not always accurate due to other activity in the operating system or Labview.  I've used a similar method in the past, but replaced the while loop with a Timed Loop and removed the Wait function from inside.  I believe the Timed Loop is less susceptible to external delays.

Jason

Jason
.
0 Kudos
Message 3 of 6
(4,723 Views)

Guys,

     I appreciate the help. The reason im doing this is because i am writing a motor controller code that uses serial commands to interface to a PIC board i built.  I send the board a board and motor address and then a position value. it then outputs a pwm pulse accordingly. The issue is that i have to switch between 2 different motor addresses fast enough that they can be controlled reliably.

example command

<board address><motor><position, asci>

a1t

a2g

i have to send those almost at the smae time so that they make the motors move at almost the same time. they need to be independently controlled as they will be used in a tank like controll situation. If you all are interested ill send sample code. I am using the student version of 8.2.

Thanks.

0 Kudos
Message 4 of 6
(4,712 Views)
....but, why do you need this switch every second?

Have you 2 PIC boards, each controlling one motor, in a serial multidrop (RS485) bus? Or have you 2 different boards on two different buses (each RS232, for example)?

Posting your code can be useful, even if I won't be able to read it (I have LV 7.1), but you'll find other users that can help you.  Or post a picture of your code....

graziano
0 Kudos
Message 5 of 6
(4,705 Views)

I really appreciate all the help. Sorry i never wrote back. Since those last posts, i have learned ALOT about labview and how things. work..... the help with the shift registers made life so much easier in general, and it helped me realize that i had no idea how to do what i needed to do... but since then i figured it out and now it works perfectly...

now i am having serial issue, but thats another thread...

 

thanks..

0 Kudos
Message 6 of 6
(4,567 Views)