LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading voltage and current value from Keithley 2430-C with Arduino Mega

Solved!
Go to solution

Hi all,

 

I'm not sure if I'm putting this question at the right location or not. If I'm not, please let me know.

 

I'm currently trying to record voltage and current readings from Keithley 2430-C SMU output into a csv file.

I have 24 devices powered by the SMU and those devices are connected to relay switches individually. All the devices will be powered for 20 minutes and then all the relay switches will be open-circuited. The relay switches will be turned on (short-circuited) rotationally. The Labview will performed to record the readings into csv file. And then all the relay switches will be short-circuited and the SMU will continue to power the devices.

 

All devices powered up for 20 mins → All devices turned off  Turn on one device → Record the readings → Turn off the device Repeat for the other devices Back to Step 1

 

My questions are:

1. Is Labview able to run or include two different devices (Keithley 2430-C and Arduino Mega) in the block diagram?

2. Does anyone have any example for me to refer to?

3. What are the drivers that I should install? I have installed Labview Interface for Arduino through the VI Package Manager.

 

Thanks in advance.

0 Kudos
Message 1 of 7
(304 Views)
Solution
Accepted by Wesley123

Hello,

 

You seem to be on the right track, at least that's what it looks like in the attached image. Most members of this forum (myself included) do not use the latest LabVIEW version. When attaching a .vi be sure to select "File > Save for previous version" and to save a 2020 (or earlier) version of the file in advance. Now, to answer your questions:

 

1. Yes, LabVIEW can run multiple devices at once. They can be run within the same loop (which is exactly what you are doing) or in parallel loops (e.g. Producer/Consumer architecture).

2. The NI forum has a code repository. You will certainly find an example of your interest there.

3. To communicate via Serial Communication you only need to install the NI-Visa package. It looks like it's already installed, but be sure to check it on your Package Manager.

0 Kudos
Message 2 of 7
(258 Views)

Hi Gabriel,

 

Thank you for your reply. 

I have attached the .vi file in earlier version. Not sure if I'm doing it right or not. 

I have look through the  code repository that you suggest. Probably I'm not looking it deep enough or I have miss out something, almost all the example related to Arduino are just solely using Arduino, even the tutorial in youtube as well.

0 Kudos
Message 3 of 7
(237 Views)

Hi Gabriel,

 

Thanks for your reply. I think I have achieve desired outcome.

 

Anyhow, I still share out the results here.

Driver installed: Keithley 24XX, LINX

Modified from Keithley 24XX Read Single .vi

0 Kudos
Message 4 of 7
(224 Views)

Hi Wesley,

 


@Wesley123 wrote:

I think I have achieve desired outcome.


I think you should improve your block diagram to follow the common style guide!

See this part of the block diagram:

 

  • Straighten wires, use shift registers for any references (!), don't use FOR loops set to iterate just once…
  • You even had that "100s wait" hidden behind the large FOR loop! What's the comment on waiting for "20 min" when there is a 100s wait? Think about UX when your VI apparently does NOTHING for more than a minute…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(215 Views)

Hi GerdW,

 

Thank you for the letting me know that there is a 100s delay that I forgot to remove at the back of the for loop.

Currently I'm only been to Labview environment for less than one week. I'm still struggling to figure out the syntax of every function. 

 

Still, thank you very much for the advice.

0 Kudos
Message 6 of 7
(204 Views)

Hi Wesley,

 


@Wesley123 wrote:

Thank you for the letting me know that there is a 100s delay that I forgot to remove at the back of the for loop.


Because you don't cleanup your block diagram!

Clean code helps to improve readability and reduce errors in the code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(197 Views)