LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi to real instrument

I've recently been trying to convert what was done in linux to labview and am having trouble on a few steps.  I am trying to control a Nima box that controls stepper motors and various other things.  The main problem I am having is, I'm not exactly sure how to make the code I wrote for a VI work with the actual instrument over a serial cable.  I attached the code I am using.  Is it just another chunk of code I need to add into this?  I received various .vi files from Nima: AD4, BuildCmS, CheckSum, DA4, DataRply, DectoHx2, DectoHx4, Globaray, Globvar2, Globvar3, Globvar4, Globvar5, Globvar6, Globvars, HextoDec, IO, Relays.  Am I to combine these into some sort of driver or integrate them into the program I already started?  Thanks for any suggestions
0 Kudos
Message 1 of 11
(3,749 Views)
Did Nima provide an example VI's to show how these VI's can be used together?  Those VI's you listed sound like they are already set to be a SubVI in which case you should use them as such rather than trying to "integrate" them into your code which I assume means a cut and paste job.
 
Your code shows only 1 subVI (Digport).  The code is an unusual architecture.  Is this supposed to be your top level VI?  Most things that are occurring only happen once except for a start/stop button that just spins a loop pumping out a string has fast as it can until the button is released, then it does another iteration of the outer loop.
 
For communication with a serial device, look in the example finder for examples doing Serial reads and writes using VISA commands.
0 Kudos
Message 2 of 11
(3,735 Views)
Well the file I linked was just something I had googled and it was pretty much what I wanted, but not completely, so I'm not attached to it.  I haven't ever used labview, but I have used c, c++ and java 5.0, so what you're saying about sub vi's, those are similar to classes?  So I would need to write  "main" that relies on these classes that the company gave?  If that is the case do you know of a specific tutorial I can use (on this site or elsewhere) to learn about how to do this?  I'm not exactly sure what to search for so it'd be great if you could point me in the right direction. . Thanks again for the help
0 Kudos
Message 3 of 11
(3,720 Views)
Hi,

search for 3h and 6h courses in LabView at the Academic section of the NI website! (here's the German version)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,708 Views)
I searched 3h/6h and only got articles about cameras and time stamps?  Are you sure thats what I want to search for?
0 Kudos
Message 5 of 11
(3,694 Views)
Hi kevin,

have you tried my link?

Here you can find the English version...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(3,686 Views)
Thats much better, sorry, I did check the link, but I didn't get the German part!  Anyway, is there any difference between the 3 hour and 6 hour?  Or is the 3 hour just a condensed version of the 6? 
0 Kudos
Message 7 of 11
(3,665 Views)
Hi kevin,

I don't know - I never took those courses Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(3,661 Views)
Ok, well thanks a lot for the help, I'll give those a try!
0 Kudos
Message 9 of 11
(3,655 Views)
Since you say you've never used labview, definitely take Gerd's advice and go through the online courses/tutorials.
 
Sub-VI's are more like subroutines or functions.  Basically an encapsulation of code  which allows you to modularize the code to allow you to reuse portions of code among different parts of the program and hide the details of code that don't need to be seen at the higher level.  They are an important part of Labview programming that should be learned soon after learning how to hook up wires.
 
Labview has recently introduced objects and classes which are definitely a more advanced LV programming topic, and they are still working on them and improving upon them.  I have no experience them.
0 Kudos
Message 10 of 11
(3,641 Views)