Go to Post FIRST kids never cease to amaze me. - Wayne C. [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 19-02-2011, 19:43
Clark Pappas's Avatar
Clark Pappas Clark Pappas is offline
Team Captain
FRC #4068
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Colorado
Posts: 34
Clark Pappas is an unknown quantity at this point
LabVIEW Dashboard printing garbage data

Hi everybody.


Our robot is running Lua, and we are having it send a 4-8 character string to LabVIEW using the AddString() function. Directly printing the sent value, it displays a few random characters that aren't on the keyboard.

We can get and display data types like U8 and U16 perfectly fine, it's just Strings in particular that are becoming issues. Any ideas on what's wrong?
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2011, 21:26
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,752
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: LabVIEW Dashboard printing garbage data

LV strings are preceded by a four byte binary count. If the Lua string is different, this may explain the bad characters. If you can give a more specific example, I may be able to recommend how to make the strings compatible.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2011, 20:53
Clark Pappas's Avatar
Clark Pappas Clark Pappas is offline
Team Captain
FRC #4068
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Colorado
Posts: 34
Clark Pappas is an unknown quantity at this point
Re: LabVIEW Dashboard printing garbage data

Alright.


I add StringControl to the DashboardData typedef, and re-add it into the dashboard VI. When its unbundled with the Analog and Digital modules and such, i link a string indicator to it, and get strange characters printed in it.

Examples of what gets sent:
AddString("stow")
AddString("vertical")
AddString("pickup")
AddString("Slot")
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2011, 21:16
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,752
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: LabVIEW Dashboard printing garbage data

But what are the characters that are printed?

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 04-03-2011, 21:40
Clark Pappas's Avatar
Clark Pappas Clark Pappas is offline
Team Captain
FRC #4068
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Colorado
Posts: 34
Clark Pappas is an unknown quantity at this point
Re: LabVIEW Dashboard printing garbage data

Alright, here's an example:

String sent from robot: "Slot"

String printed in Dashboard: "ìèH"
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 20:33.

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