LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String control not updating to latest values untill probe watch is used.

Solved!
Go to solution

Hello everyone!

 

I hope someone can help me out with this issue that has been driving crazy for the last 2 weeks, I have a true/false case structure inside a while loop, in the true case I'm sending a constant to my arduino through VISA write, which is working right, every time the true case is true this code is executed well, but the false case which has a VISA write with a String control input attached to the Write Buffer terminal is not sending the data to the arduino until i either run it in highlight mode or i use the probe watch on the write buffer terminal.  I am controlling this string input from the panel, I got Update while typing and Limit to single line property nodes and still not working, I mean the issue is that when i type a new value (numeric) into the string control from the panel it doesnt update until i use probe watch on that line, I have heard that using the property value signaling this can be solved

 

is it true???

please help!

0 Kudos
Message 1 of 18
(3,784 Views)

Post your code. We can't see what is actually happening so there is no way to tell your what you need to change.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 18
(3,751 Views)

sorry i forgot to upload it there it is.

0 Kudos
Message 3 of 18
(3,743 Views)

The value signalling property node is only used when you have an event structure, which you don't have.

 

I don't completely understand what you are saying isn't working.

 

You say that the True case "executed well", but the false case is not sending data (the "V"?) to the Arduino.  How do you know it's not?  Are you monitoring it at the Arduino?

Then you say "I am controlling this string input from the front panel".  Well the false case that isn't working is a constant, not the data from the front panel control.  Then you say when you type a new value into the string control, it doesn't update (what is it?) If it is the data going to the Arduino, that contradicts what you said when the  true case "executed well".

 

It is odd that you have the VISA Read and VISA Write operating in parallel.  Usually a program will Write something, followed by a Read of the response happening in series.  But since the read and write are happening in parallel, what you are reading is not a response based on what you wrote?  You don't need two VISA Closes.  And if the VISA Read and Write were happening in series, you'd have only one purple VISA reference wire chained through the code anyway.

0 Kudos
Message 4 of 18
(3,731 Views)

Well, the first thing I notice is you are reading the Update While Typing and Limit Single Line property nodes, but you are not setting them to anything. Is that what you mean to do? Because I think there is not much point just reading the values when it doesn't look like you are doing anything with them.

 

As for why it's not sending the data to your arduino, I can't really be sure, but is it possible that you are keeping focus in the control while typing and only clicking outside the control when you go to turn on highlight execution or probe? Update While Typing is false for you string control right now, which I think means that the value of the control will not be updated until you click your mouse away from the control or somehow un-focus it. So the clicking outside the control could be what's doing it.

 

I would recommend changing your architecture because the way it is now doesn't seem like its easy to get what you want. Look in to using an event structure instead and use an event based architecture (if you have questions about this, we can try to help).

0 Kudos
Message 5 of 18
(3,730 Views)

The constant "V" is sent and received by the arduino (which is the false part) when i switch to the true case and try to write a new setpoint (numeric) from the front panel the value is not send to arduino until i probe watch the line in write buffer. looks like is not updating.

0 Kudos
Message 6 of 18
(3,725 Views)

I more or less get what you say, the Update While Typing is actually working the string control box is updating whenever I type in a new value but I can only see the new value when i use probe watch on the line that feeds the write buffer with this value, and when i use probe watch the value is received by my arduino, otherwise it keeps working with the previous value

0 Kudos
Message 7 of 18
(3,719 Views)

But how do you know it's not sending it to the Arduino?

 

Typically, communication with Arduino's are based on sending human readable strings.  What does the send and receive code on the Arduino look like?  When you send human readable strings, it is typical to send a termination character like a line feed or carriage return so the other device knows the message is done.  By default your VISA Serial Configure is setup to enable the termination character on receiving, and that it is a linefeed character.  Are you taking advantage of that in your Arduino code?

 

Also, you talk about probing the "write buffer".  Exactly what do you mean by that?  Do you mean one or both of the string wires heading into the VISA Write?

0 Kudos
Message 8 of 18
(3,715 Views)

Just to be sure, though, try typing into the string control and then just clicking outside the string control box. Does this work to send it to your arduino?

0 Kudos
Message 9 of 18
(3,714 Views)

I unsure what you mean by "the Update While Typing is actually working" because when I look at your VI, update while typing is set to false. Do you just mean that you see the letters being added to the string control as you type? This doesn't mean that the value read by the block diagram will be updated.

 

Edit: note, though, that I don't think you should use Update While Typing. If the user types something wrong and does a backspace, you don't want the wrong thing they type to get sent to the arduino.

0 Kudos
Message 10 of 18
(3,709 Views)