LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the waveform-type inside of the waveform graph from int to double?

Hello,

attached you find a vi with two waveform-graphs.

When i rightclick them and select "create constant" then it creates the constant.

The difference between the two graphs is, that one creates a double-array inside the constant and the other graph creates an int-array inside

 

The question is: Where can i change inside of the int-graph that it also creates a double-array in the constant?

 

(Problem is that all double-waveforms send into this graph are changed to int and rounded in the display)

 

Thanks for the help

0 Kudos
Message 1 of 9
(7,971 Views)

All you need to do is right-click on the array, then change the representation

 

INT to DBL.PNG

Cory K
0 Kudos
Message 2 of 9
(7,964 Views)

Yes, i know how to change the constant, but i want to change the type inside of the graph. So that the next time when i select "create constant" it creates the double-array automatically.

(The constant is only used to check if the graph has the correct type.)

0 Kudos
Message 3 of 9
(7,960 Views)

You can try deleting your Int Graph.

Then copy & paste your double graph.


Now when you create a constant from the pasted graph, the y-array will be DBL

Cory K
0 Kudos
Message 4 of 9
(7,948 Views)

Yes, i know that i can do this. The attached is only an example to explain my question.

 

But i want to understand WHY it is like it is.

And also HOW i can solve this problem without workarounds.

 

Thanks for your help

0 Kudos
Message 5 of 9
(7,941 Views)

Hi OnlyOne,

 

there is no setting in the properties of a waveform to change the type. There is even no need, a waveform recognizes the data type of the connected wire automatically, It would not be very comfortable to change the data types in every waveform manually each time.

Kind regards
Tobias S.
0 Kudos
Message 6 of 9
(7,913 Views)

The datatype of a chart or graph is determined by the last thing you wired to it.  By default, they are simple doubles or arrays of doubles.  My guess is that you first wired a waveform with an integer data type to the graph.  It should switch automatically to a double waveform graph if you wire a waveform which contains double data to it.  If it does not, that is probably a bug.  If you have a VI in this state, please post it and I will report it to R&D.

 

Thanks!

Message 7 of 9
(7,901 Views)

I can confirm having this bug. The only workaround I can find is copying and pasting a waveform graph of the correct type...but this is very frusterating when a waveform graph type that is needed is not available in the current VI. Please fix!

0 Kudos
Message 8 of 9
(7,794 Views)

I cannot reproduce this with the following steps (LabVIEW 2010 SP1):

 

 

  1. Change the constant type as mentioned above.
  2. Change one of the previous integer values to a floating value (I changed the first value to 1.5)
  3. Run
It worked as expected.  I suspect I am missing something.  Could you post explicit directions on how you arrive at the problem.  Exact sequence could be very important.  Thanks!

 

0 Kudos
Message 9 of 9
(7,779 Views)