LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't work?

Solved!
Go to solution
 Could anyone help me here... and tell me why the second picture don't work.. because the first one works... and the unique difference is because in the last 4 wires, I wire it to a case selector and depends on the result in a different VI I did some simple math with that values. But when I did it... When I use another program too see that graph.. all the values, including the others that I didn't modify anything... are with crazy values!

 

I will upload a screen from my real code so maybe you can see any difference!

 

Thanks

 

This works:

and this work.JPG

 

and this don't work:

 

why it dont work.JPG

 

If anyone know why it happens, please help me

0 Kudos
Message 1 of 14
(3,735 Views)
What kind of crazy values are you seing (nan, values way to large , too small...)? Did you try using Highlight execution, probe windows or retain wire values for debugging. Also this is very unreadable code. Consider the following: Group wipes into clusters of logically grouped values, make these clusters a typdef and pas a few wires (or possibly 1) instead on many. Use bundle by name Make smaller processing functions which work on the clusters. You are most likely running into difficulty from code style issues, it becomes very difficult to debug applications as the quantity of wires grows.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 14
(3,731 Views)

I can only see 1 of the cases you've added, but that one changes sign of the value, so ofcourse you'll get crazy values.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 14
(3,725 Views)

Well I get like big values... like 375000000 instead of 150 😛

 

Yes, I have 3 cases, first one x -1 so yes, I change the signal because Power Factor can be negative... So in my opinion, if I'm changing only that value... why all the others become crazy too?? the second case I put value/value so I get 1.. the third case I send the normal value without doing nothing.

 

 

 

 

0 Kudos
Message 4 of 14
(3,716 Views)
Solution
Accepted by topic author EduU

Sounds like a conversion error, e.g. -1 in I16 is 65535 in U16. I see you have several Coercion dots (the small red triangles), double check your representation.

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 14
(3,698 Views)

Thanks, Yamaeda

 

I took a look here and the part of case selector and I saw I was getting a DBL and all my code was sending SGL... so I convert it and now works =D

 

 

0 Kudos
Message 6 of 14
(3,685 Views)
Why didn't you stick to your original thread????
0 Kudos
Message 7 of 14
(3,660 Views)

EduU wrote:

Thanks, Yamaeda

 

I took a look here and the part of case selector and I saw I was getting a DBL and all my code was sending SGL... so I convert it and now works =D

 

 


 

Am I the only one who thinks this wasn't the actual solution to the problem?  Can converting a DBL to SGL give errors like this?

 

Where's the headscratcher smiley?

0 Kudos
Message 8 of 14
(3,654 Views)

Well, Intaris

 

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!

 

Now I have a problem... 

 

Well so I will try to explain it to you.

Well at the first moment I have a file that record 7200 samples and show it to me in 1 to 1 sec, when I run the converter on that file, it gives me only 1 graph with all the time I measure like, When I select Voltage and Current it shows me a unique graphic since I started to monitorate until I finish.

But my problem is, When I convert, this new file in the end the values don't matter with the original file. You can see in the time... in the original file its end at 00:17:30 (example) and in the converted file its end at 00:18:35.

 

So I think something at my logic is wrong.

I will upload all the VIs you will need to make that!

First you run "Conversor4V4I-A teste5.vi" so should open a window to you select where you want to save it... so you choose somewhere... after that will open another window... to you select the file to be converted... so you have to select "teste gmg-3.BIN" so the program will run... and will finish.... now you have to open the "
Le Dados Conv 4v4i S5 1 grafico.vi" and select the new file you saved... so you will see at the end of time what happens. I'm using LabVIEW 7.1 in that project!

 

I hope someone can help me!

Message Edited by EduU on 04-20-2010 10:28 AM
0 Kudos
Message 9 of 14
(3,639 Views)

EduU wrote:

I took a look here and the part of case selector and I saw I was getting a DBL and all my code was sending SGL... so I convert it and now works


 

 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.
 
0 Kudos
Message 10 of 14
(3,622 Views)