01-30-2015 02:32 PM
Hi, I am very new to labview. Anyways I have some trigger set up that writes a " ` " character when triggered. I would like to set my labview program up so that when it receives this key it begins running, and further pressings of this key do nothing (the program continues until its completed). Is there a simple way to do this? Any help would be greatly appreciated.
01-30-2015 05:00 PM
01-30-2015 06:45 PM
ah yes, thank you for your reply. I have watched a few of the beginner tutorials. So my current plan was to just put the program within a case structure. The condition then could be an input form the keyboard matching the string constant " ` ", which would execute once it receives this. I have the input keyboard wired to the acquire input data and use the output from the acquire input data to compare to the string constant " ` " using the logial equals sign. I would then connect the result of that comparison to the case statement. I now get this error:
These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1D array of
boolean (TRUE or FALSE).
The type of the sink is boolean (TRUE or FALSE).
So it appears like the result I'm getting from the keyboard is not a string, and so it won't let me compare to the string constant. I'm not sure what format the key is in, but is there a way to fix this, perhaps by casting to a string? Thanks very much in advance.
01-30-2015 07:12 PM
01-30-2015 07:19 PM
01-30-2015 07:27 PM
Hi, yes I realize my Labview terminology might be a bit off. Here is a screenshot of the block diagram
01-30-2015 07:49 PM
01-30-2015 07:56 PM
01-30-2015 09:42 PM
OK, thanks for the help. I realize lots of the code is more complicated than it needs to be. It's partially due to it being a placeholder for the next step and partially, because as I said before, I am new to labview and it is drastically different than text based programming languages. Thanks for the tip about the while loop, that makes more sense.