Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68895

Is Case structure what I need (newbie)

$
0
0

I'm attempting to write a VI to control a multi zone furnace. The board(s) used to control the furnace take about 25 different commands.

I'll be sending commands (strings) over a serial port. Commands take differing arguments so there are variable inputs for concatenating

a string into a valid command before writing to the serial port. Further complicating things, each string includes a checksum at the end.

 

Currently users are expecting to select a command (in simple english, not what is sent over the port) and provide added info based on

the command. I then gather this up, format a string that the board understands and write it to the port.

 

I'm guessing the Case structure is what I should be using. But as far I can tell (I'm a newbie so I can't sure of much), for each case in the

structure it appears that the inputs to the concatenation have to be the same in type, order and number. I keep getting errors if I attempt

to use a Case structure where one case uses 2 strings to concatenate into a command, another uses 5 strings etc. I get unwired element

errors.

 

Is the Case structure limited in the way I'm seeing or is there a way around this (something a newbie doesn't know)?

 

Or is there a different structure I should be using?

 

I've attached 2 VIs (both are just baby steps at this point, the "bad" is expecting more strings than there are).

 

Any advice would really help.

 

Thanks,

Dave


Viewing all articles
Browse latest Browse all 68895

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>