Go to Post What's the point of competing if you're not going to be competitive? - davepowers [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-04-2009, 21:13
Cuse's Avatar
Cuse Cuse is offline
Registered User
AKA: Matt Mancuso
FRC #0175 (Buzz Robotics)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Enfield, CT
Posts: 22
Cuse is an unknown quantity at this point
Re: Set Digital out

It sounds like you are manually specifying a value for only Digital Output 7, converting it to an array, and sending that value to the SetDigOut VI. This could create problems, as doing that would (I think) default the other, unspecified values in the array to false, creating the situation that you have described. Instead, you'll need to use the GetDigOut VI first to obtain the current state of all your DigOuts. Convert the array to a cluster, unbundle it, and build a Boolean array, using DigOuts 0-6 for elements in the array, and specifying your 7th DigOut however you'd like as per your code. Then send the rebuilt array into the SetDigOut VI. I did a little experimentation and this worked for me, so hopefully it will solve your problems.
__________________


Last edited by Cuse : 04-04-2009 at 21:56. Reason: Did a little experimentation
Reply With Quote
  #2   Spotlight this post!  
Unread 13-04-2009, 21:43
JasonF JasonF is offline
Registered User
FRC #2848 (The All Sparks)
Team Role: Programmer
 
Join Date: Apr 2009
Rookie Year: 2009
Location: Irving Texas
Posts: 24
JasonF is an unknown quantity at this point
Re: Set Digital out

Maybe I am not understanding the question completely

But If you have an Array of data already that is changing Simply use a "Replace Array Subset", set the index to 7 (DIO 8 on the DS) and the new element to True or False. This will leave the rest of the data in the Array untouched, changing only the 1 element

Other wise build your array with Boolean Values. Using the Set DIO DS VI drop a "build array" In, expand it to 8 Elements (0-7) and then use Constants on the Last Output and whatever outputs you are not using for False. Then pass your data into the Outputs that fluctuate.

I Hope this helps, if not send me a message or something, I have been working on the DIOs for the past couple days...

Jason
Reply With Quote
  #3   Spotlight this post!  
Unread 13-04-2009, 22:01
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Set Digital out

Quote:
Originally Posted by JasonF
If you have an Array of data already that is changing Simply use a "Replace Array Subset", set the index to 7 (DIO 8 on the DS) and the new element to True or False. This will leave the rest of the data in the Array untouched, changing only the 1 element
Make sure that when you do this, you use a shift register or feedback node so the array values are retained for the next iteration
__________________
-- Marshal Horn
Reply With Quote
  #4   Spotlight this post!  
Unread 13-04-2009, 22:19
JasonF JasonF is offline
Registered User
FRC #2848 (The All Sparks)
Team Role: Programmer
 
Join Date: Apr 2009
Rookie Year: 2009
Location: Irving Texas
Posts: 24
JasonF is an unknown quantity at this point
Re: Set Digital out

Quote:
Originally Posted by kamocat View Post
Make sure that when you do this, you use a shift register or feedback node so the array values are retained for the next iteration
Good point,
Thanks for the catch
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting out Digital NASA TV Billfred General Forum 2 03-12-2007 18:55
pulsing digital out pins, not as fast as pwms Generalx5 Programming 5 02-04-2007 18:52
Digital out signal speed on off, almost like PWM but at max 60Hz Generalx5 Electrical 2 27-03-2007 12:26
Set Default Digital inputs to Low? How? bad Analog value? Generalx5 Programming 11 04-01-2007 18:57
Digital Caliper as a Digital Readout on Small Mill sanddrag Technical Discussion 9 13-10-2005 22:51


All times are GMT -5. The time now is 21:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi