LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Something up with my strings?!

 

Wondering if someone can help.

I have used the standard basic serial read/write from the examples to talk to my sensor. It works fine until I swap over the method of providing the string to write value to the Write block.

You will see in my middle sequence structure that i have left the  “string to write” input wired in. This works, but when i swap it over with either a constant, or my own Vi, it don’t seem to want to write anything.

Any ideas?

Thanks

 

 

Message 1 of 7
(3,309 Views)

You need to make sure that the constant is presented the same way as the control. To be sure, right click on the control's terminal and choose create - constant.

0 Kudos
Message 2 of 7
(3,301 Views)

thats exactly what i did do

0 Kudos
Message 3 of 7
(3,296 Views)

Then it really should work! I cannot understand why it would not.

0 Kudos
Message 4 of 7
(3,288 Views)

Right click on the control and then right click on your constant. Note that the control has '\' Code Display selected.

 

Don't configure and close the port with each iteration of the loop. They belong outside. And get rid of the sequence structure.

0 Kudos
Message 5 of 7
(3,282 Views)

 


@labnoob wrote:

thats exactly what i did do


One of the "Features" on labVIEW that I like the least is that when you Copy strings from one represtation to a different one (like \codes to normal) you get some odd behavior.  the "Create constant" aLlways drops a constant in "normal" display

 

 

Here is an brief example demonstration the behavior

String Fun.png


"Should be" isn't "Is" -Jay
Message 6 of 7
(3,264 Views)

Cheers Guys, very helpful

0 Kudos
Message 7 of 7
(3,195 Views)