09-22-2020 04:59 AM
I have created one logic to continuous array value increment...Here I have attached logic that I have made...Actually I want to change my "8140 2080" hex value to "8141 25F0"...there any simple way to conversion make as much easy...
Thank you
09-22-2020 05:45 AM - edited 09-22-2020 05:46 AM
Why are you using 4 U8 values? Just use a single U32 and 75% of your logic will go away (no need to the strings, arrays, additional logic you didn't include to increment/decrement the other 3 values).
09-22-2020 06:03 AM - edited 09-22-2020 06:15 AM
I am developing serial based auto-calibration tool..So I need U8 Bytes..
81 byte is my EPROM address of particular parameter and rest three U8 are my compensation bytes...by varying it, I calibrate a parameter..thus i need to change rest three bytes unless of "81"
string is write message..
09-22-2020 11:28 PM
Here is my code...Example, If standard parameter 300.00 = 8140 0000...DUC Value 299.00 then I am here to change compensate DUC value..I will increase gain 8140 0000 to 8140 1020
09-23-2020 01:31 AM
Hi Tusharvp,
@Tusharvp4 wrote:
Here is my code...
That code is full of bugs…
What's the point of using the loop inside "Volt1" to check certain input values again and again when those inputs never can change as that loop is blocking the main VI?
What's the point of using all those references when you could use plain wires from the controls in the main VI?
Instead of that silly subVI all you need is a loop around the whole code in the "Auto" case with a shift register to hold the data of byte 2-4!
Cleanup the VIs before starting to implement more stuff!
@Tusharvp4 wrote:
Example, If standard parameter 300.00 = 8140 0000...DUC Value 299.00 then I am here to change compensate DUC value..I will increase gain 8140 0000 to 8140 1020
Again: using an U32 value for those 4 bytes would simplify your VI even more…
Incrementing a scalar U32 is much simpler than to increment the same value stored in 4 single byte controls!
09-23-2020 02:25 AM - edited 09-23-2020 02:26 AM
Hey..Mate
Thank you for replying...
My Instrument send me read data...when I press "SEND" Boolean (Mechanical condition -LATCH WHEN PRESSED) and sending request command "6400 0065", I will start to get data on serial read. So I am sending 6400 0065 once in initial...You can see in my code...
"READ" Boolean (Mechanical condition - SWITCH WHEN RELEASED)
Volt1 VI for 1st parameter..Same I am going to apply same logic to other parameter 82 , 83, 84 address...You can see I have given selection boolean...If I will not select not particular parameter then it will not calibrate particular parameter..
Shift Register is nice idea for U8...But here 8140 000..I want change 40 0000 for compensating anyDUC value with Standard value... (3A 0000 to 44 0000 value i needed to change)
Hope you understand..What i have done in my project..
It will be grateful, If you suggest me with absolutely new idea..😊
I
09-23-2020 02:34 AM
Hi Tusharvp,
@Tusharvp4 wrote:
Hey..Mate
I'm not your "mate"…
@Tusharvp4 wrote:
Shift Register is nice idea for U8...But here 8140 000..I want change 40 0000 for compensating anyDUC value with Standard value... (3A 0000 to 44 0000 value i needed to change)
It will be grateful, If you suggest me with absolutely new idea..😊
I (and others) was talking about using a shift register for an U32 value.
It seems like an "absolutely new idea" for you to use an U32 value instead of 4 U8 values…
@Tusharvp4 wrote:
My Instrument send me read data...when I press "SEND" Boolean (Mechanical condition -LATCH WHEN PRESSED) and sending request command "6400 0065", I will start to get data on serial read. So I am sending 6400 0065 once in initial...You can see in my code...
Volt1 VI for 1st parameter..Same I am going to apply same logic to other parameter 82 , 83, 84 address...You can see I have given selection boolean...If I will not select not particular parameter then it will not calibrate particular parameter..
I would implement a statemachine to execute all steps (aka states) needed in your communication scheme.
Another "absolutely new idea" for you?