LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and arduino with keypad

Hello,

I'm a student and I have a project in labVIEW but i am not very good in working with IV and arduino.

I want to connect the 4x4 keypad to arduino and use it as input in my project to write the date.

Do you have any tips? Thank you!

0 Kudos
Message 1 of 6
(1,334 Views)

Hi obiken,

 


@obiken wrote:

I'm a student and I have a project in labVIEW but i am not very good in working with IV and arduino.

I want to connect the 4x4 keypad to arduino and use it as input in my project to write the date.

Do you have any tips?


Suggestion: Learn LabVIEW and Arduino IDE, especially when you are "not very good" at it!

 

More suggestions:

  • Connect the keypad to your Arduino according to its manual.
  • Implement an Arduino sketch to read the keypad input and send the corresponding chars to your computer using the (virtual) serial port of the Arduino.
  • Read those chars in LabVIEW using VISA functions.
  • Handle that input data as needed by your program…
Best regards,
GerdW


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

Thank you for your time, GerdW.

I have a difficulty with your last step "Handle that input data as needed by your program".

I do not know how to connect these 2 programs. 😞

Download All
0 Kudos
Message 3 of 6
(1,243 Views)

Hi obiken,

 


@obiken wrote:

I have a difficulty with your last step "Handle that input data as needed by your program".

I do not know how to connect these 2 programs.


So the Arduino sends you that "1" character.

What should happen with this character? what do you want to achieve with that character?

 

(I guess you want to collect several of those chars in a string so you might think about using shift registers with a ConcatString function…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,239 Views)

I made it work how I wanted but after approximately 15 sec of running, I get this error. When i press stop, it highlights the "Scan from string". I tried switching arduino port but no luck.

Also i do not know what is with that square after the input.

 

Possible reason(s):

LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
Command requires GPIB Controller to be Controller-In-Charge.

error.png

Download All
0 Kudos
Message 5 of 6
(1,228 Views)

Hi obiken,

 


@obiken wrote:

Also i do not know what is with that square after the input. 


Switch the string indicator to \-code (or hex) display mode to see what it is…

 


@obiken wrote:

When i press stop, it highlights the "Scan from string".

Possible reason(s):

LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.


When ScanFromString gives an error an input to that function does not contain the expected data…

Have you tried to debug that case?

 

Also there is a different error for your COM port as shown in that other image: you don't need to wire all those default values to SerialPortInit! (Check which property it doesn't like…)

Best regards,
GerdW


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