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: 

Directly use the Labview on VisualStudio

I have already built the labview to control the NI USB 6353. But I have another sensor which need to be prgrammed by C#. Can I use VisualStudio to program the sensors and import what I had from Labview so that I don't have to rewrite the USB 6353 again in C# language? Thank you so much!

0 Kudos
Message 1 of 4
(3,160 Views)

Hi,

 

you could build a LabVIEW Dll and use that in C#. My guess is, it would still make sense performance wise, to rewrite the code for your 6353 in C#, if it's not too much. Generally there are many solutions to your problem: Create LabVIEW Dll to use in C#, rewrite code in C#, program the Sensor in LabVIEW (if there's a .Net assembly it might work just fine) or create a C# DLL and use it in LabVIEW. 



Remember Cunningham's Law
0 Kudos
Message 2 of 4
(3,133 Views)

Depending on what you are doing to control the USB 6353, it may not be that big of a deal to program it in C#.

 

It isn't a bad thing to know more than one programming language. 

0 Kudos
Message 3 of 4
(3,090 Views)

@nyc_(is_out_of_here) wrote:

Depending on what you are doing to control the USB 6353, it may not be that big of a deal to program it in C#.

 

It isn't a bad thing to know more than one programming language. 


I would agree - with this caveat:

 

Learn the new language correctly.  If you just learn C# by just winging it, who knows what kind of coding cr@p you could be churning out?  It is a headache to troubleshoot when someone does that in LabVIEW, and because of that, I'd never foist any of my VB .NET stuff upon anyone in a VS forum.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(3,049 Views)