View Single Post
  #15   Spotlight this post!  
Unread 17-01-2014, 14:43
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Processed Image > Robot Movement Help Needed

The input to the unflatten node called "type" is used to describe what was flattened in the string. You need to wire the same datatype to type as you wired into the flatten node on the dashboard. It is often easiest to drag and drop directly from one window to the other to ensure they are the same. If you envision this changing, you should read up on typedefs as a means to share types between projects.

The robot project contains a file called robot global.vi. If you open that you'll see that there are already a few in use. To create another, drag your type into robot global and name it. You can now drag robot global from the project into tele op and periodic tasks and select the global to read or write.

Another thing you should do in the loop you show that reads the SD, unflattens, and updates the global is to add a delay. As written, this parallel loop requests that it run as fast as possible. This will max out the CPU. In reality, this loop probably needs to wait for 30ms or 50ms in parallel with the operations it contains. Notice that the other loops do this already with 10ms and 100ms wired up.

For more details on globals, please search the general LabVIEW help documentation.

Greg McKaskle
Reply With Quote