LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

A challengable conversion: translate Prec_##Type

(interresting, all Modula-2 types defined in C... nice work, but pretty useless, better use a real modula-2 compiler)

 

the 2 files compiled succesfully with CVI 9.0  after i removed the include for missing files, uncommented the definitions for SHORTINT, INTEGER, LONGINT, and removed the #define MULTITARGET_FRAMEWORK which was preventing the definition of type BOOLEAN. unfortunately, nothing tells me if those types are defined in the include file which were not uploaded.

 

 

now, can you show us how do you use these files ?

0 Kudos
Message 11 of 16
(2,104 Views)

i am sorry, i replied too fast.

 

i tried using:

FixDefConst(5, Every_2nd_Loop_Sec_W);

as you posted in a previous post, and... compiler crash ! internal error, CVI exits right on the spot !

 

the solution is to assign the result to a variable, then it should compile fine. like this :

Every_2nd_Loop_Sec_W value = FixDefConst(5, Every_2nd_Loop_Sec_W);

then everything is fine and the compilation completes succesfully.

 

(now we need someone from NI to tell us why CVI 9.0 crashes this way when the result is not assigned to a variable...)

 

 

0 Kudos
Message 12 of 16
(2,100 Views)

Hello all,

 

I have reproduced what you've seen, and have filed a bug report with ID 177794 for the issue.  We have not yet investigated enough to offer an explanation of the crash.  Hopefully it will not be to much of a development burden, as the crash only occurs if the expression is not assigned to anything.  We'll post back with more information when we have it.

 

Thanks! 

 

NickB

National Instruments  

0 Kudos
Message 13 of 16
(2,074 Views)

Dear sir

 

I'm using kind of Fix point math libarary in my code with envioronment of ANSI-C embedded code. Currently, there's no "software" simulator/tool for coding verfication. So that's why I'm trying to use Labwindows for debugging my arithmetic and logic. There's full of ## keyword in the embedded code math libarary. In order for use these math libarary in CVI, what I need to do first is to translate these ##.

 

Thanks!

Jacky

0 Kudos
Message 14 of 16
(2,028 Views)

I'm going to have to repeat this. CVI is an ANSI C compiler and it fully understands the "token pasting" operator ##. We have tried to explain it to you with examples, but it is clear that you still do not understand what is going on, so maybe you should book yourself onto a C course at a local college, with someone who can explain it face to face.

 

JR

0 Kudos
Message 15 of 16
(2,021 Views)

you talked about "tool for coding verfication". do you mean that you run an external tool to verify compliance with a certain coding standard ? (like "lint" for example)

 

in any case, you should NOT have to translate anything, the header will compile fine using CVI. just #include the header and add the library source file to your project. this will mimic the way your fixed-point library is compiled in your embedded C environment (you still have to be careful of the bit-length of integer types). if you encounter the crash you posted earlier, i did provide a workaround to allow the compilation to complete.

 

maybe you are having another problem that we don't understand. if this is the case, can you please be more precise ?

0 Kudos
Message 16 of 16
(2,017 Views)