Jump to content

How to display digital input state?


Recommended Posts

Hi,

I want to be able to show the state of a digital input pin in real time, and it is harder than I thought it would be.

In the test panels, there is a nice LED to show when the digital input is high or low - I want the same LED on my Labview program so that I know when the program is supposed to be triggered.

I am taking the signal from the same digital trigger that starts the data acquisition from the analogue inputs. The default data output from the digital pin is a 1-D boolean array, and I want to convert this to something that can make and LED indicator turn on and off. E.g. a real-time boolean value.

So far, I have tried converting the 1-d boolean array to string, dynamic data type, array, and number, and then use a logic "greater than zero?" test to try and trigger the LED, but I get no output at all - the value stays at zero even though in the test panels I can see the indicator flashing. If anyone knows how to do this, please let me know.

Cheers

Link to comment

OK, I managed to work it out - I take the 1D array, and use "Index Array", set the index to zero, and the value turns into a boolean value, which can be sent to an LED indicator. You can also create indicator from the output directly, and this will create a line of LEDs in the front panel representing the array values.

Hope this helps others!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.