LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Increment

Highlighted

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

0 Kudos
Message 1 of 7
(296 Views)
Highlighted

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(272 Views)
Highlighted

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..

0 Kudos
Message 3 of 7
(258 Views)
Highlighted

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  

0 Kudos
Message 4 of 7
(175 Views)
Highlighted

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!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 5 of 7
(151 Views)
Highlighted

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

0 Kudos
Message 6 of 7
(145 Views)
Highlighted

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?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 7 of 7
(138 Views)