Go to Post [when asked where to learn about robot parts] ...some forum called Chief Delphi. I hear the people there are pretty knowledgeable about this robotics thing. - EricH [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 30-03-2012, 11:36
Angkrit Angkrit is offline
Registered User
no team
 
Join Date: Mar 2012
Location: Germany
Posts: 2
Angkrit is an unknown quantity at this point
Event structure with unit change problems

Hello, how can I make the value change corresponding to the changed unit in the array?


For example, when I change the unit of "flow" to be L/hr, the value should appear from 4 to 240 in the data mainstream without adjusting the value manually. It should pop up automatically. I know how to change the unit but don't know how to make it appear in the data mainstream with the same numeric control block.

I tried to use an event structure but don't know exactly how to work around it.
Attached Files
File Type: vi unit change.vi (13.5 KB, 9 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 30-03-2012, 12:35
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Event structure with unit change problems

See if this helps.

By the way, this isn't a NI or LabVIEW help site. This website is for the FIRST Robotics competition. For help with NI and LabVIEW help, please check out:

http://www.ni.com/

http://lavag.org/

We're here to help anyone, but with questions outside of FIRST, the responses will be slower.
Attached Files
File Type: vi unit change.vi (14.2 KB, 1 views)
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 30-03-2012 at 12:40.
Reply With Quote
  #3   Spotlight this post!  
Unread 30-03-2012, 13:47
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Event structure with unit change problems

As Ryan said, this forum is mostly for the FIRST Robotics Competition, but you are more than welcome to join us. Just be warned that you might have to start a robotics team if you stick around.

It looks like the VI you attached is pretty close - the event structure is firing on the value change. However, the logic inside of it performs a unit conversion on all of the items in the array without paying attention to what the old units were.

To show this, set the unit to L/hr, type in a value, and hit enter. The value entered is mis-converted and replaced.

One way to work around this is with the "OldVal" node on the side of your event structure. This can help you find what the old unit was and convert (or not) as appropriate.
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


All times are GMT -5. The time now is 04:13.

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