From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows convert to LaBVIEW

Solved!
Go to solution
Hi,
maybe a stupid question, but I can ask.
Is it possible to convert a project from LabWindows / cvi to Labview?

I have projects done in LabWindows, but I need them in LabView.
I have to create this in this, but I don't really focus on LabView to create an identical project.

Thank you for your advice
Have a nice day
0 Kudos
Message 1 of 7
(3,149 Views)

You could make DLLs in LabWindows and then call them in LabVIEW.  But there is no direct conversion.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(3,125 Views)
Sure, this is what I wanted to know, a pity it's not possible when it's practically on the same platform.
Can I find some way to create DLLs?
0 Kudos
Message 3 of 7
(3,111 Views)

@MajklS wrote:
Sure, this is what I wanted to know, a pity it's not possible when it's practically on the same platform.
Can I find some way to create DLLs?

But it's not the same platform.  They are two completely different software platforms.

0 Kudos
Message 4 of 7
(3,071 Views)

@MajklS wrote:
Sure, this is what I wanted to know, a pity it's not possible when it's practically on the same platform.

Same company.  Completely different paradigms.  LabWindows/CVI is an ANSI C environment while LabVIEW is a data flow programming environment.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(3,030 Views)
I see. I understand, thank you for the explanation.
 
So I would have another question, I have stored data in fields from
RdData [0] to RdData [9].
Data goes on serial line RS232.
  α = ComRdTerm (COMP, RdData, 900.0xff);
For example, I have Height on RdData [1] and I want to display it in the StripChart.
How can I read this data in LabView?

Thank you 🙂
0 Kudos
Message 6 of 7
(2,938 Views)
Solution
Accepted by topic author MajklS

@MajklS wrote:
I see. I understand, thank you for the explanation.
 
So I would have another question, I have stored data in fields from
RdData [0] to RdData [9].
Data goes on serial line RS232.
  α = ComRdTerm (COMP, RdData, 900.0xff);
For example, I have Height on RdData [1] and I want to display it in the StripChart.
How can I read this data in LabView?

Generally you use NI-VISA functions to communicate with an RS-232 device.

Principally you use VISA Configure Serial Port.vi to initialize the port to the desired communication parameters and then a VISA Write to send a command to the device if necessary and then a VISA Read to read the response from the device.

 

Your parameters to ComRdTerm() look a little funky though. If your RdData array has only 10 elements declared you definitely shouldn't tell the function to attempt to read up to 900 bytes. Also the decimal point should be likely a comma to separate the termination character code from the rest as a separate parameter.

To get NI-VISA to use 0xFF as termination character like used in your C code example, you would have to connect a constant with that value to the according VISA Configure Serial Port.vi input. Then VISA Read will return as soon as it encounters this termination character in the serial data stream (or an error or the timeout occurs).

VISA Read will return a LabVIEW String but you can easily convert that into a byte array with the String to Byte Array node and then reference the bytes with an Index Array node.

If your returned data is more complex than individual bytes you can use the Unflatten from String function instead to turn the received string into a LabVIEW Cluster, which is the equivalent of a C struct. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 7
(2,821 Views)