Hello! I have a friend who is currently trying to navigate learning Labview. I had had some experience with it but wasn’t able to answer many of the questions that she had, so I was hoping someone more well versed in labview would be able to help her out. She was not a FIRST alum, so she asked me to post the following:
“Hi, My name is Jackie and physics researcher in charge of connecting a bunch of power supplies to LabVIEW so we can control all of our hardware remotely. I have never done something like this and no one in my research lab has worked with LabVIEW so I have nowhere to turn for help.
Anyway, I have a few basic questions that I need guidance on.
in order to do connect multiple hardware like this, I would have to make an actor framework right? or do I need to start a queued message handler? I’m learning as I go so I don’t know the difference between the two but I found quick definitions for these terms and these two seemed fitting. (please correct me if I am wrong)
what is the best way to start the block code? I’ve seen multiple examples of the block diagram code and its a bit overwhelming. Is there a book or manual I can follow with baby steps provided?
those are all of the questions I have for now but thank you in advance for any help!“
If any of you can offer some guidance would you be able to dm me so that I can give you her email? Thanks so much!
It depends on your requirements, but I’d say start simple. The above VI is just a single-loop, cyclic executive that measures and commands each power supply module a few times per second. I’d probably recommend starting out with something like that, and only implementing more complex parallel stuff like actors or semaphores if you hit a performance bottleneck.
Again, start simple. In the case of an N6700 connected via Ethernet, for example, first see if you can set up a TCP connection and get it to respond to an *IDN?. Then, see if you can measure the voltage on one of the channels. Just keep building up functionality. And remember, it’s way better to have a lot of little, well-tested VIs with clean interfaces than to try to do everything in one big VI.
I am the friend that asked for help. I decided to make an account to reply.
My plan was to make an actor framework because, from what I understand, I can create VIs and Sub VIs to control multiple power supplies, oscilloscopes, and other hardware at once. In addition, all of the hardware needs to be able to communicate with each other. I was under the impression that an actor framework would allow me to "create an application that consists of multiple independent tasks that communicate with each other. " This definition, provided to me by LabView, seems to fit my needs from what I know.
Also, it might be important to note that I am using LabVIEW NXG, which provides templates I can use, but I cannot make sense of the code used in each template. This hinders me from modifying the code to fit my needs. I attached the block code provided to me in the actor framework template, but again, I’m not sure what to change to best suite my needs.
Darn, for a second I thought by “LabVIEW” you meant FRC LabVIEW. I would’ve suggested Jim Chastain on YouTube. You could still give his videos a shot; they were very helpful when I was learning the ins and outs of LV.
Thank you so much for the suggestion. Unfortunately, I think the videos are a little too niche and I can’t really apply much from them to my project. However, I will keep them in mind as I continue to learn more about them.
What settings do you need to control on the power supplies? If you just need to turn the output on/off, change the voltage and current level, and monitor faults, then I think an actor framework would be too much. An actor framework would be useful if you wanted to remotely change some of the deeper settings on the power supplies (like OCP, OVP, voltage rise rate, etc.).
You could create an individual do-while loop for each power supply, continuously setting the voltage and current while monitoring the output. Or, it could all be in one loop, and the commands for each power supply are in parallel.
The National Instruments forum also has an Example Programs section (Example Programs - NI Community), so you could always see if something that has been uploaded is useful.
Aside from that, check online to see if there are preexisting LabVIEW VIs for your power supplies. Often, the manufacturers have a set of LabVIEW Drivers on the product page you can download to use, and they usually come with examples.
Before you go too far down the LabVIEW NXG route, are you aware that NXG is being discontinued?
We will cease development efforts on LabVIEW NXG and release the final version - LabVIEW NXG 5.1 – in 2021. We will not release new versions of LabVIEW NXG starting in 2022.
At one point, i would need to control the OCP, OVP settings. But I am not sure how I could control those settings via an actor framework. I actually don’t know how to turn any of the hardware on and off through LabVIEW…Maybe I should start there. I’ll definitely check out the videos though!
I have downloaded several examples, one of the power supplies I need to connect (CAEN DT1470ET) came with plenty. However, I noticed I cannot seem to find the block code associated with each example. Only the VI Front panel pops up. I do know how to create a front panel, but its the code that I am struggling with. do you know where i can find the block code attached to these examples?