06-28-2010 12:56 AM
Hi,
I need to add a file as a Configuration Script File (text format) between the GUI keys and CAN Message Packets.
With every key press, the LabVIEW reads the corresponding address from the configuration script file using name of the key and create a packe.
How can i implement this? i think by using the concept of Multi tasking its possible to read and write simultaneously.
Please Comment on this.
regards,
mfp.
06-28-2010 04:25 AM
Hi Favas,
why do you need "Multitasking" to read a file at startup of your VI and then select entries from it by "key press"?
And could you please clarify "GUI keys"? Are these keys on the keyboard, buttons on the GUI or "keys" in terms of special numbers/passwords?
Well, I would read in the script file, parse it into an array (containing the different actions/scripts) and select the script corresponding to the "key"...
06-28-2010 05:03 AM
06-28-2010 05:12 AM
Thanks for the input.
The GUI is developed using LabVIEW, which contain lots of keys (Push Button, Selection Keys etc.), each key has its own name. The Configuration File Contains Sections Corresponding to these key names. with every key press i need labview to search the configuration file for the section name corresponding to that particular key and take values from that particular section for further processing.
Actually its not a duplicate post, it related to Multithreading, which i need in another phase of the project.
regards,
mfp.
06-28-2010 01:11 PM
Are you asking how to look up information in a config file? Or how to act upon a user pressing a key or button? I'll answer both.
Use the Event Structure to cause some action when a user presses a key or button. For instance, if the user presses button X, use the Value Change event for button X. Inside that event case, you put your code to get the appropriate value from the config file.
Inside the event case, you can define which section and key to look up. Then use the Config File Read function to look up the value. Process as needed.
06-29-2010 02:17 AM
Thanks for the input.
Using CAN 2.0 B Extended Protocol, the LabVIEW GUI is receiving messages from the target board. I need to take different actions based on the Arbitration ID present in the CAN Message. so its required to parse the 29 bit identifier. How shall i do this? from the CAN Message Buffer LabVIEW read the message and ungroup it so that i can get different portions in message like ARB ID, Extn Bit, SRR, Data etc.
Also, How Shall i get the variable type (Int,char etc) from the Block Diagram?
regards,
mfp
06-29-2010 10:35 AM - edited 06-29-2010 10:36 AM
What has this got to do with Configuration Files? I am not familiar with CAN, sorry. You should start a new thread and put CAN in the title. That way you will get people who are knowledgable with CAN to respond.
06-29-2010 11:10 PM
Ok. -mfp