NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Peter Saraiva
Posts: 66
0 Kudos
Accepted Solution

Drop-down menu

Hi,

 

I have to communicate in modbus with a machine which is in ASCII, so I want to create a drop-down menu within all the ASCII command. 

 

Any Idea ?

 

thanks

Peter.

Labview 2010
Trusted Enthusiast
P@Anand
Posts: 2,385
0 Kudos

Re: Drop-down menu

You can take all the commands into Ring control and pass the values using the property nodes.

-----

The best solution is the one you find it by yourself
Knight of NI
GerdW
Posts: 10,013
0 Kudos

Re: Drop-down menu

Hi Peter,

 

"Any Idea ?"

Yes: take a dropdown menu (aka Ring) and input all your "ASCII command"...

 

What answer do you expect? Just create the menu!

Best regards,
GerdW


CLAD, using 2009SP1 + LV2011SP1 (sometimes even LV2014) on WinXP+Win7+cRIO
Kudos are welcome :smileywink:
Member
Peter Saraiva
Posts: 66
0 Kudos

Re: Drop-down menu

I don't really know,

 

In fact, in the drop down menu I want to put the instruction (example : Move to the first position) and when this case is chosen we send the ASCII code of this instruction to the machine..

Peter.

Labview 2010
Trusted Enthusiast
P@Anand
Posts: 2,385

Re: Drop-down menu

If that is a big instruction then you can go for Enum so what ever you want the desciption of the command put it into Enum so correspondingly in case structure you can send the command.

-----

The best solution is the one you find it by yourself
Knight of NI
GerdW
Posts: 10,013
0 Kudos

Re: Drop-down menu

Hi Peter,

 

"when this case is chosen we send the ASCII code"

Well, that sounds like the perfect use for a case structure, don't you think?

Best regards,
GerdW


CLAD, using 2009SP1 + LV2011SP1 (sometimes even LV2014) on WinXP+Win7+cRIO
Kudos are welcome :smileywink:
Member
Peter Saraiva
Posts: 66
0 Kudos

Re: Drop-down menu

Yes of course I'll use a case structure.

but in what kind of variable should I put my string command ? and where can I find that ? knowing that the command are in ASCII

 

Regards

Peter.

Labview 2010
Knight of NI
GerdW
Posts: 10,013

Re: Drop-down menu

Hi Peter,

 

- LabVIEW doesn't work with variables...

- when you need "ASCII commands" I would use a string constant...

Best regards,
GerdW


CLAD, using 2009SP1 + LV2011SP1 (sometimes even LV2014) on WinXP+Win7+cRIO
Kudos are welcome :smileywink:
Member
Peter Saraiva
Posts: 66
0 Kudos

Re: Drop-down menu

Ok, sorry I'm a new user of labview lol :smileyembarrassed:  

 

 

Thank you for your help;

 

Peter.

Labview 2010
Proven Zealot
Jeff·Þ·Bohrer
Posts: 7,985
0 Kudos

Re: Drop-down menu

Actually-  This sounds like a great use for a combo box.  They are a littel under used but can very easilly map a pairs of strings.  Display "Human readable" and value in ASCII.

8-Ball Consulting advertising banner

Certified LabVIEW Consultant. The partner you can bank on when you're behind the 8-Ball.