Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Store commands as a table of strings

$
0
0

Hi :-) new user trying to grab hold of the NI-beast.  ...and already hit up the wrong board once  oops

 

I am trying to write a tool to capture readings from a FWB6010 Gaussmeter.  The meter has a bunch of commands.  I put together a few switches to send various commands to manipulate the settings on the meter eg :UNIT:FLUX:GAUSS or :smileyfrustrated:ENSE:HOLD:smileyfrustrated:TATE 1 for instance.  

 

I would normally create an array containing these commands and then grab the appropriate command as needed, either by a numeric index or perhaps even by searching for the command name.

 

The examples and videos I've seen do not make me confident about this approach.  Really don't want the commands scattered all over the code, though.

 

Any advice, examples, slaps in the right direction would be highly appreciated.  Oh, and if you've already written something to suck the readings off a device like this, I'd love to hear more about it.

 

Thanks,

Thys


Viewing all articles
Browse latest Browse all 5565

Trending Articles



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