02-22-2013 10:00 AM
The majority of the last bit of rube can also be simplified:
"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books
02-25-2013 12:20 AM
Hi crossrulz
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
crossrulz wrote:
[...]
On a serious note: What is the second loop supposed to be doing? The way I see it, you already have all the information you need in the first loop. I don't see a point in your second loop.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After i read status command response i need to show all data to user. After i read successfully i need to wait for user to press exit from front panel. Becasue user take some time to analyse all the datas. second while loop for that only. Thats why termination condition are either error occured or exit pressed by user.
02-25-2013 12:22 AM
Hi crossrulz
Your reply for that
------------------------------------------------------------------------------------------------------------------------------------------------------
Lets not go for reduction of code inside first while loop,i tried already
------------------------------------------------------------------------------------------------------------------------------------------------------
I got this idea before but i did this becasue in other project size of store rate,scan rate varies and i kept it general.
This doesnt make any difference
02-25-2013 12:28 AM
Hi GerdW,
I also can go for this but the placement of all the status strings in the front panel is not same hence i need to read the bits like this only. I cant use array.
One more thing, how you are printing the code in this style. i saw this in many places. Any shortcut method for that ?
02-25-2013 12:30 AM
Hi bsvare,
Tell me how can i simplify. All the property node is for different controls. Please post your simplified version.
Thanks
02-25-2013 12:36 AM
Hi crossrulz,
Thanks for your concern. see the response of different elements is not of fixed size as some are 2,4,6,16,18 bytes. This is better becasue in future if it changes also only thing i need to modify is index. if i simply drag that then next time i need to see from the starts. In my other projects this is different. So i tried to keep this general.
02-25-2013 09:47 AM
There are many ways you can implement your code and still have a much less rube style of code. You do understand that you are ignoring the advice of some of the top LabVIEW programmers on the forums. Rather than debate with them that your bad code is the only way to do things try to listen to their advice and learn how to improve your code.
02-25-2013 10:44 PM
Dear Mark_Yedinak,
I always want to learn,Tell me where i can reduce my code ?
I am not debating with my SIRs, See they are replying me with modification and i am replying them with my answer that 'This is the reason becasue of this i am doing like this'.
This is not debate, see if at last i will be proved wrong then i will learn something. This is discussion for learning not FIGHTING or DEBATE.
03-18-2013 05:06 AM
Ranjeet,
You seem to have missed the fundamental point that all the Gurus are trying to give you. Simplify how you process the code cand do one function for all items of the same type (that way if you have it wrong it is easier to correct, it is easier for others to read, and the code is smaller.) THEN when the data is processed, in it's final form you can have your propery nodes/ indicators or whatever you need to update. It's much easier to keep the code seperate that way.
Standard NI Mantra:
1) Aquire
2) Anaylse (Process Data)
3) Present (Display Processed Data to user)