LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with string as a standard input or constant

Hi,

I am execting a VI wich consists on download de font code of an specific web.

the following image works perfectly. as you see, the input string is an standard inpunt control.

 

Captura.PNG

where the front panel is:

Captura.PNG

I do not want to write the standard input directly, I want to pass it as string, this string will be different depends on the web page that I want to explore.

So the problem is that if I change the standard control input by a constant with the same text, it does not work.

 

Captura.PNG

 

As you can see, the standard input is the same but introduced in differents ways.

The error that appears is the following:

Captura.PNG

 

Please, Can you help me?

 

I attach the VI.

Thanks in advance.

 

 

0 Kudos
Message 1 of 10
(2,544 Views)

Did you generate the string constant by typing or right clicking on the standard input control and then choosing "Create constant" from the context menu?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
0 Kudos
Message 2 of 10
(2,520 Views)

Hi,

right clicking on the standard input control and then choosing "Create constant"

0 Kudos
Message 3 of 10
(2,515 Views)

Changing your control's display style to \ Codes, I see that you have "\n\n" at the end, indicating you have a couple of End Of Line characters.  I am pretty sure you do not want those there.  But it is hard to tell without the constant so I can examine it the same way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(2,513 Views)

what should I do?

I do not know how to visualize in \Codes. 

0 Kudos
Message 5 of 10
(2,509 Views)

Hi aitor,

 

what should I do?

- always attach VIs (or snippets) instead of plain pictures!

- right-click the string constant and change the display mode…

- even better: make the display style item visible (right-click!) and select the display style with this item…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,498 Views)

The context menu is your friend. For both the control and the constant. You can also choose to display the current style (Visible items -> Display Style).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
0 Kudos
Message 7 of 10
(2,494 Views)

Hi, the Vi is attached,

LA SOLUCIÓN ÉS AÑADIR UN ENTER EN LA LÍNEA DE COMANDA,  NADA DE FORMATO NI NADA.

0 Kudos
Message 8 of 10
(2,493 Views)

Hi,

LA SOLUCIÓN ES AÑADIR UN ENTER EN LA LÍNEA DE COMANDA, 

 

THANKS

0 Kudos
Message 9 of 10
(2,491 Views)

So it actually sounds like you have too many "enters" at the end of the command in your control (you had 2 when you should only have 1).

 

The formatting was purely to help understand exactly what you are sending.  Right-click on the control and choose "Visible Items->Display Style".  You should see a little glyph added to your string control (or constant) to show what the display style is.  When using \ Codes, you will see things like \s for space, \t for a tab, \\ for \, and \n for an end of line ("enter").


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 10
(2,471 Views)