10-08-2019 06:57 AM
Hi guys,
I try to write some commands in the command line to instrument and it doesn't work.
F:C?;F:START?;F:STOP?
F:C? means center frequency,
F:START? start quency
and F:STOP? stop frequency
but the result shows only center frequency.
Someone here knows why?
/mctnnn
10-08-2019 07:07 AM
What instrument you are using?
If you have code, please post it.
And to avoid frustrated smileys, :S put your code in code brackets
F:START?;
10-08-2019 07:20 AM
10-08-2019 07:26 AM
I try to write and read to and from a spectrum analyzer.
The code is simple:
/mctnnn
10-08-2019 07:32 AM
@Atizss wrote:
What instrument you are using?
If you have code, please post it.
And to avoid frustrated smileys, :S put your code in code brackets
F:START?;
The better solution is you can go into your profile settings on ni.com and disable the automatic smileys.
10-08-2019 07:32 AM
Thank you cbutcher for your reply,
The response from instrument shows only center frequency.
Can explain further what you mean and how to do it with Read mulitple time?
/mctnnn
10-08-2019 07:38 AM
10-08-2019 07:41 AM
@mctnnn wrote:
Can explain further what you mean and how to do it with Read mulitple time?
You need to perform a read for each query you sent. So perform 3 reads.
10-08-2019 07:49 AM
Thank cbutcher,
your design looks more professional one.
I try and use it.
Regards,
/mctnnn
10-08-2019 07:57 AM
@mctnnn wrote:
Thank cbutcher,
your design looks more professional one.
I try and use it.
Regards,
/mctnnn
I mean, I'm flattered, but just remember that adding "professional looking" stuff isn't as good as not adding any stuff. So if you create a VI that uses these 3 commands all the time, and never changes the written string, then just wire a constant 3 instead of doing the string search.
The string search is useful if you might have an arbitrary number of commands concatenated (and you don't have a way of knowing how many from when you concatenated them, which you should). So I don't anticipate it's likely to be necessary unless the "message building" part is separated from the "visa writing" part by a 'module boundary' etc (software engineering, not LabVIEW term), and you don't want to also pass an integer into the Write/Read function as to number of Reads needed.