ā09-24-2008 05:10 AM
Hello all,
I need to write an application that:
1) Reads an array of strings from a file, and show it on a indicator (and this is correctly done)
2) Edit the array, as it was a control
3) Elaborate the strings (My array is a list of SPI commands, that are sent to an external device)
4) Optionally, save the modified array back to a file
How can this be done? It's not possible to think of a property node that converts the indicator to control, because the indicator is connected to a source of data, and the control should be connected to a destination... (an SPI driver in my case)
I somehow need an item with two connections, one entering and one exiting.
Thanks
Solved! Go to Solution.
ā09-24-2008 05:32 AM
Hello... š
Try to do this with local variable of that indicator.. So you will be able to use it as indicator as well as control... š
Just a thought.. š
ā09-24-2008 05:33 AM
ā09-24-2008 05:33 AM
Hello xdaf,
You could use local variables of an array command
ā09-24-2008 05:38 AM
ā09-24-2008 07:35 AM
Hello all,
and thanks for your replies!
I think I've adopted a solution similar to the one you suggested, obtaining this front panel (see "frontpanel1.jpg" attachment)
The frontpanel I'd like to obtain is the one depicted on "frontpanel2.jpg": one structure (control or indicator?) used both to edit and to view what I load from file.
Maybe the only solution is to overlap a control and an indicator, and to toggle the "visible" property...
ā09-24-2008 07:57 AM - edited ā09-24-2008 08:00 AM
I would just use an indicator, with the actual contents of the array held in a shift register. When a change is made to the sequence, save the shanges to the shift register and update the indicator.
If you want to be able to enter data into the element. Then I would use a string control, and enable / disable the control to allow editing.
ā09-24-2008 09:24 AM - edited ā09-24-2008 09:26 AM
Now I understand what you mean... and it's working!!!
For a given control, I can creat two local variables: a readable one and a writable one.
Thanks to everybody!
ā09-24-2008 09:33 AM
Please note that local variables should be used with caution, and in most cases are not even necessary. Also, local variables can lead to race conditions.
Personally, I would look for a more elegant solution than using local variables.
ā09-24-2008 09:39 AM