01-13-2010 06:21 AM
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!! 😄
Solved! Go to Solution.
01-13-2010 06:50 AM
01-13-2010 06:52 AM
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?
01-13-2010 09:32 AM
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!
01-13-2010 09:37 AM
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 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?
01-13-2010 09:39 AM
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.
01-13-2010 10:07 AM
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.
01-13-2010 10:18 AM
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
01-13-2010 11:17 AM
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.
01-13-2010 11:45 AM