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: 

Get an 5 Volatge output When my String control '' Name '' is Miissing and Display that as a Erroor

Hi everyone...

        I am using Labview 2011 software and I am currently doing a project in which I require a 5 Voltage output.

        In my project i have a string control which is controlled by the user/operator and the string control is nothing but the Model name of a component. My sequence is like this..

      1.Open the software and run it.

      2. Enter the Model name of the particular component in the string control place and and the      sequence runs.

      3. Now If the string control is empty an error pop up should arrive saying " fill the empty string control " and a 5V output also to be required to give a command to stop my driver controller.   This is done because Until my String control is entered my labview should show error and it should not work and at the same time a 5V output should be given during this time to stop my controller to work.

    I am stuck in getting this 5V output and stoping the labview can be done logically in it.

 

      Do anyone have any idea were we can use any interfacing medium to get an 5V output.I had used Arduino UNO interfacing medium but in that once the usb (communication medium) is removed and then inserted again the logic does not work properly.

     Is there any other method available for this work.

 

 Hoping for a positive response

Sudhin sudh

0 Kudos
Message 1 of 12
(3,141 Views)

Its Quite Basic i guess, try to share the Code/Code Snippet to provide better suggestions.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 12
(3,135 Views)

Entering the String Control is just a part of my whole coding. I just require to get a 5V output if when This string control space is empty.

0 Kudos
Message 3 of 12
(3,126 Views)

Hi sudhin,

 

as you refuse to supply your code I just can provide pseudocode:

IF EmptyString(string) THEN output 5V
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 12
(3,106 Views)

HI Friends,...

Im using a arduino UNO now to get a 5V output. The sequence are all correct and i am getting the output aswell..

For checking purpose here i have a boolean which when pressed the output "led glows" and boolean is off , output "Led does not glow".

When i close my labview software it does not work and when its open the process normally continues as it is.

But when the USB cable is removed and plugged in, the functionality do not work and it gets an error 5002,5003,1073807343. These error may be generated at a time when the stop is pressed after the usb removal and re insertion is done.

Here i need to work my arduino as plug and play and it should continue the same sequence output even when the usb of arduino are removed and inserted back.

 Im attaching the vi  i am using

 

Hoping for positive response.

Sudhin sudh

Download All
0 Kudos
Message 5 of 12
(2,981 Views)

Hi Sudhin,

 

when you want to have your VI react on errors you need to program this behaviour!

Add some error handling to your VI!

 

Something along the lines of

close serial port
open serial part again

Your VI lacks some waits in the loop(s).

And it misses basic style guide. Did you ever try to use AutoCleanup?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(2,969 Views)

Thank you for your quick reply...

   Can you just look show me, how can i code it.

I need the arduino as plug and play with usb. Since the only problem i am getting is once the usb cable is removed, the coding does not work.

 

Sudhin sudh

 

0 Kudos
Message 7 of 12
(2,963 Views)

Hi Sudhin,

 

Since the only problem i am getting is once the usb cable is removed, the coding does not work.

Yes, sure does the code fail when you remove the hardware!

 

But you get an error message and so you can let your VI react on this error message.

As said before: you need to implement some error handling in your VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(2,960 Views)

yeah but the error message is generated when i press the stop button (Named as "acknowledge" ) of while loop.

I need to do this automatically like it should see for the error and acknowledge it automatically.

 

Sudhin sudh

 

0 Kudos
Message 9 of 12
(2,955 Views)

Hi Sudhin,

 

I need to do this automatically like it should see for the error and acknowledge it automatically.

Then you need to handle it programmatically!

Simple pseudocode looks like this:

IF error THEN handle error!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(2,946 Views)