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: 

data from pop up window

Solved!
Go to solution
Hello, everyone.

 

I'm trying to make a pop-up window which let me introduce some data, and then to use it with visa write/read.  When I'd push OK, the changes don't carry out.  Also, I have tried doing with the white loop around all the IV, but it nor work.  I put the example down.

 

Another doubt I have if  I use visa read/write I just can receive one data?? I'd like to utilize only one visa read/write to receive a large string and I'd separate the diferent data from the string. Could I?

 

Thanks!! 😄

0 Kudos
Message 1 of 12
(2,848 Views)

Another doubt I have if  I use visa read/write I just can receive one data?? I'd like to utilize only one visa read/write to receive a large string and I'd separate the diferent data from the string. Could I?
Put the visa read inside a while loop and exit after you get your required number of data
0 Kudos
Message 2 of 12
(2,835 Views)

Hi Jose,

 

"If  I use visa read/write I just can receive one data?"

 

This depends on your measurement device. Some need special commands (like your "2va?") to send a new value, other send new values on each read command (atleast GPIB devices can be configured so).

 

"When I'd push OK, the changes don't carry out."

Have you checked this using highlight execution?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 12
(2,832 Views)

First of all, thanks for answering.

 

I'm sorry I didn't express clearly. I use a GPIB, and I can send all the commands together separate by semicolon [1va;2va;3va]. Then, the machine I'm using send me some numbers. Each one in a newline.  The visa read only gets one of them... That's the problem, although I know that I'm receiving all of them.

 

But it's a  secondary problem, because I could do it in another way, the really important is to get data from a pop-window. I've thinking about put the pop-up windows inside a state machine, could it be a solution?

 

I don't know what you mean when you say highlight execution. I'm sorry I'm a Learner.

 

Regards!

0 Kudos
Message 4 of 12
(2,810 Views)

Hi Joselito,

 

"Highlight execution": switch on the lamp in the menu line of the block diagram window, then start the VI - now you can watch the dataflow Smiley Wink That's a basic debugging technique, so I would also suggest reading the manual...

 

"get data from a pop-window"

You can get data from anywhere. Just use some wires! What exactly is a pop-window?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(2,805 Views)

Your VI is confusing. You are only sending a single command (1ac) to a VISA Write. You have done nothing with the 2ac command. Why don't you simply create an array of commands and pass it to a for loop with the VISA Write/Read inside.

 

If this is a subVI, you also need to connect the outputs to the connector pane in order to get anything back in the calling VI.

 

0 Kudos
Message 6 of 12
(2,803 Views)

Hi Dennis Knutson;

 

Before I did this SubVI I did other where I get de acceleration and velocity of several motors, and so it works right [I put down, if you want to see].  Then I've done this command in the same way. Yes, this is a subVI, but before to connect with other modules I'm checking which works right.

I'd be able to send all the parameters together because the machine understands(1va;1ac;2va;2ac;..), but I'm not able to get (process) all response of the machine.

 

Regards

 

P.d.: I'm sorry if I didn't understand completely your reply.

0 Kudos
Message 7 of 12
(2,791 Views)

You did not do anything in the same way with your new code. You are not creating a single string with all of those commands and you are not sending each command separately. You aren't even sending the same commands. You are sending only 1ac with a number appended. This isn't even a query (no ?) so why are you even doing a VISA Read?

 

It's very confusing on what you actually want to do since there is no correlation between the VI in your first post and the VI in your last. Explain exactly what commands you want to send

0 Kudos
Message 8 of 12
(2,785 Views)

I'm sorry Dennis Knutson. I'm ashamed of myself. 

 

I'd like to send a big command with a lot of orders [although I didn't do it because I was't able to read all the response of my machine] How I said, the machine give me the response likes rows, each number in newline, and Visa read only understands the first valor.

 

So I tried to do it step by step. Sending command by command, and reading the response of my machine. But I'm wrong, I know because I noticed you told me. My machine understood like I've just sent the first one message 1ac + number. (1ac follow of a number, 0 in this case. It means 1ac0=Axis1;ac=change aceleration to;0).

 

 The problem to me, it's not send commands if not read the response. Any solution?  

 

I usually read and looking for my doubts in a manual, but when I have got specifics doubts I have to post, haven't I?.

 

Thanks everyone.

0 Kudos
Message 9 of 12
(2,771 Views)
I'm still not sure exactly what you are looking for or what the confusion is. You can create as many commands (1ac, etc.) as you want in the loop and build an array of them. Pass the array to a for loop with just a VISA Write. Since they are not queries, you do not use a VISA Read after. Then, if you want to do the queries (1ac?,etc.), create an array of them and pass to a for loop with a VISA Write followed by a VISA Read. You pass the results of the VISA Read through the for loop and you get an array of responses.
0 Kudos
Message 10 of 12
(2,764 Views)