LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create fixed-point number using LabVIEW VI scripting

Solved!
Go to solution

The snippest used a specific property subset that isn't normally exposed. It was brown due to the private property. The code you posted in your previous post uses the same property (FXPRepBits)

Tim A.
0 Kudos
Message 11 of 39
(1,259 Views)

I will be waiting for theresults. Because it is very essential to me to find a way how to do it. 

0 Kudos
Message 12 of 39
(1,244 Views)

@timtamslam wrote:

The snippest used a specific property subset that isn't normally exposed. It was brown due to the private property. The code you posted in your previous post uses the same property (FXPRepBits)


Right.  Your snippet was brown and mine is blue, yet they're the same property.  Is your brown because it was private in an older version of LabVIEW?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 13 of 39
(1,240 Views)

@chikenene wrote:

I will be waiting for theresults. Because it is very essential to me to find a way how to do it. 


Did you not look at my earlier posts?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 14 of 39
(1,238 Views)

I don't have that FXDRepBits in Property Node options. 

0 Kudos
Message 15 of 39
(1,225 Views)

You need to learn about snippets; the images in my post are more than they seem.  If you have LabVIEW 2009 or later, you can drag the picture into your block diagram and the code will magically appear.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 16 of 39
(1,210 Views)

The property we are referring to is the same color in both of ours, jcarmody. I was referring to your post here, 

 

http://forums.ni.com/t5/LabVIEW/Setting-the-fixed-point-type-on-the-to-fixed-point-function/m-p/2499...

 

I see that you're referencing your snippet in this thread though. I don't know specifically what's happening is my suspicion is that, it shows up as brown on my machine because I have access to it as a private type. Even if I move your blue snippet onto my BD, it will become brown. I tested the same snippet on a test machine that didnt have access to the private types, and it stays blue. I dont know specifically why this happens but its almost like the machines that don't natively have access are inheriting it through the snippet. 

 

In the end we should likely wait for what DFGray proposes as the correct approach to scripting fxp's. 

Tim A.
Message 17 of 39
(1,196 Views)
Solution
Accepted by chikenene

I have confirmed that these properties should be safe to use. Attached are VIs to set them on both constants and controls. LabVIEW version is 8.0. I wrote them in 2013 and saved for previous, so let me know if you have problems. I do not have 8.0 on my development machine. The properties themselves have been around since about 2004.

Message 18 of 39
(1,190 Views)

This gap in scripting FXP-related properties has been reported as CAR 405418.

Message 19 of 39
(1,174 Views)

I got the snippet succesfuly into my VI. Thank you for that!

But the option FXPRepBits works only for DigitalNumericConstant?

0 Kudos
Message 20 of 39
(1,146 Views)