LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Motion Controller Through Serial

Solved!
Go to solution

 All the examples of the UU command always use a whole number (of discrete steps) to define the multiplier value.

UU command.PNG
 
I'm not 100% sure on this, but if you are still getting an error, try using an integer value (630) instead of the floating point value of 629.921

0 Kudos
Message 11 of 16
(847 Views)

@Bob_Schor wrote:

When you have a new device, always "play with it" using MAX first, as you can get immediate feedback on how your device works.

 

Bob Schor


If what I previously suggested doesn't work, I'm running out of ideas. Take Bob's advice and try using MAX. Post what you see and we may be able to figure out what's going on.

0 Kudos
Message 12 of 16
(841 Views)

Hello, I attached 3 screenshot communicating with controller using visa test panel.Is this what you want? 

 

visa test panel.JPGvisa test panel1.JPGvisa test panel2.JPG

0 Kudos
Message 13 of 16
(836 Views)

Good news. You got a valid response to ?uu. “uf” is the code for the factory default setting for the multiplier (1:1)

 

Now for the bad news.

First, the response was to ?uu<LF> which I thought was an improper command, and then it responded with an empty string to a good command.

 

Secondly, your previous command uu629.921 didn’t work.  UU is still set to default. 

 

My first thought is you have stale data in the buffer. Without sending any commands, click the “read” button until the Return Data window shows a timeout error (the buffer will then be empty).

 

Send the ?uu; and see what comes back. Click the read button a second time to see if all the data was read. I’ve seen instruments that send multiple responses to a single command. Count how many times the read button can be pressed until a timeout occurs.

 

Repeat this several times to see if the ?uu and number of reads are consistent. 

 

Once you get an idea of how the ?uu command actually works, you can start playing around with the uu629.921 command. 

0 Kudos
Message 14 of 16
(823 Views)

Hi jamiva, 

 

Yes you are correct. My instrument need to read twice to read the number I want. 

The reason it read Uf is because I didn't write uu=629.921 at that time..

So there is no way to change it only need to read one time right? 

0 Kudos
Message 15 of 16
(799 Views)
Solution
Accepted by topic author zyb1003

If it was me, I would do the multi read and NOT go the "Bytes at Port" route.

 

I would create a SubVI (something like this) that could be reused for each data query.

 

multi-line VISA Query.png

Message 16 of 16
(796 Views)