From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about VISA write value

I want to write a freuquency value into VISA write buffer. but the integer part and fractional part should be written in different registers.

1.png

 

this is what I've done:
2.png

 

but the array cannot connect with the VISA string. How can I change the configure? Thanks!

0 Kudos
Message 1 of 7
(2,714 Views)

you should write to each register one by one.

VISA write does not accept clusters.

Message 2 of 7
(2,710 Views)

@cantata2014 wrote:

 

 

but the array cannot connect with the VISA string. How can I change the configure? Thanks!


That is not an Array, but a cluster that you are sending to VISA Write.

Message 3 of 7
(2,677 Views)

I think what you really want is Concatinate Strings.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 7
(2,670 Views)

but after combining them by using concatenate string, the string becomes 64bits, isn't it?

0 Kudos
Message 5 of 7
(2,616 Views)

No, it just becomes a longer string. The number of bits is only a factor for a number that is being expressed as a single binary value. You are creating two commands that each consume 4 bytes. Concatenating them will produce a single string 8 bytes long.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 6 of 7
(2,600 Views)

Just a fair warning.  A lot of instruments do not like to recieve commands back-to-back like this.  You may need to use two VISA Writes (one for each command) with a small delay in between to allow the device to process each one.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 7
(2,577 Views)