LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't work?

Solved!
Go to solution

Oh thanks... Now I change to "negate" (-x) so I think is better than use conversion....

 

But the error in the end of the file, continue =/

0 Kudos
Message 11 of 14
(787 Views)

EduU wrote: 

I know is kind weird... but I only change this and works now....

Maybe is because my program that read this information... was made using SGL... I don't know why... but works now!


 

 
 No, it makes sense! You are writing a binary file. So writing it as DBL and later reading it as SGL will give you twice as much, but rather meaningless data ;).
 

EduU wrote: 

Now I have a problem... 


 

 I think you have more than one problem. 😉
 
There are missing subVIs ("subVI strip binary header.vi" for example), so I cannot run the main VI. What is the scan rate coming out of it? Maybe you can replace it with a diagram constant for testing.
 
What are you trying to achieve by converting a NaN diagram constant to I32? (Modelo Matematico Eixo X.vi)
 
Index array is re-sizeable, so you don't need duplicates (Calc4V4IRTtst.vi and many other places) Use a FOR loop!
 
A lot of your code make little sense, for example instead of dividing a scalar by itself, you could just place a "1" diagram constant of the correct datatype. The while loop in "Le Dados Conv 4v4i S5 1 grafico.vi" hammers the CPU like there is no tomorrow. Why?
 
 
0 Kudos
Message 12 of 14
(765 Views)

altenbach wrote:

 

 The only reason you are getting coercions is the fact that your "-1" diagram constant is DBL (or EXT) instead of SGL. As others have said, it cannot cause the problem and thus cannot solve it. There is a primitive to multiply by -1, which would avoid the coercions in the first place. Another option is to set the representation of the "-1" diagram constant to SGL.

Well we didn't have a full code to begin with, and the only difference i could spot was the coercions, thus it had to be something with how those are handled (there or elsewhere).

Sometimes even a blind hen finds some grain. 😉

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 14
(750 Views)

Well alten,

 

The subVI is inside the zip file! 

 

Well the conversion to NaN to a number.. is because I'm comparing the voltage and the current on phase R so I have to know which one pass the X axis first... but in some cases maybe bouth don't pass the X-axis... so I convert is to a number because in comparing I'm taking the lower value.. so if don't pass I have a big number.

 

Well the scalar divide by itself I can correct, but no problem on that...

 

The while loop in "Le Dados Conv 4v4i S5 1 grafico.vi" hammers the CPU like there is no tomorrow. Why? This one I didn't understan, sorry x(

 

check which VI's are missing so I can attach for you... the sample is 7200 per second.

0 Kudos
Message 14 of 14
(724 Views)