ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intex hex Generater

I am trying to create a intel hex generater and most of the tyme the checksum is wrong , since my input will de numbers with decimels and fraction it is very tricky , anyoone have any idea

 

0 Kudos
Message 1 of 11
(316 Views)

First define what you mean by "intel (or Intex?) hex generater"(sic), then show us what you tried by attaching your VI. Make sure the controls have typical default values and explain what output you expect.

 

There are many different ways to define checksums, explain what should be used.

 

0 Kudos
Message 2 of 11
(289 Views)

When one uses a term such as "checksum", I tend to think of communicating (through TCP/IP or a serial line, where a "bit could get lost" and wanting a way to ask if this happened.  One way to do this is to divide the "message" into "bytes" (8-bit quantities) or larger "chunks" (n-bit quantities), send N of these, and also send a "checksum" computed by simply adding all the "bytes" or "chunks" sent and sending the lowest 8 (or N) bits as the final N+1 item in the data packet.  On receipt of such a message, if the sum of the first N data (mod 8 or N) equals the checksum, the data (probably) went through OK (actually, if they are not equal, some bits were lost).

 

What are you sending?  How are you sending it?  Note that even if you are sending an "image", or Floating point numbers, when you transmit them from one PC to another over a Communication Protocol, you are basically dealing with byte streams.

 

Bob Schor

0 Kudos
Message 3 of 11
(244 Views)

 

In a nutshell, we have data of unknown type that needs to be translated into a message of unknown type that also includes a checksum of unknown definition.

 

(The reverse problem would be to translate that message back into the original data while validating with the checksum, but that was not asked)

 

Until the OP replies and provides the full specification and requirements we cannot help.

 

There is a similarly named obscure ancient data encoding format. If this is what they want it can be implemented, of course.

0 Kudos
Message 4 of 11
(214 Views)

my goal is to send some data specifically float eg.1.032342 to my eprom using intel hex 

address is user defiend for me its 2 or any even number , then i have my data that is float (DBL) converted into bytes using a type converter to U8 array then i add the sum of the bytes at the end

 

:10010000214601360121470136007EFE09D2190140

  Start code   Byte count   Address   Record type   Data   Checksum

its an example of intel hex , 

 

so some times for specific numbers the data sum is wrong , How i find it is there is a website to cross check if our intel hex is correct 

 

2. Another problem is my eprom can only read 16 bits at one go 

mellu_0-1759735402206.png

 

 

0 Kudos
Message 5 of 11
(151 Views)

Do you know, that we cannot debug pictures?

I'm not willing to recreate yout code, so please post code - not pictures.

 

Maybe this can give you an idea:

 

snip.jpg

0 Kudos
Message 6 of 11
(140 Views)

Hi mellu,

 


@mellu wrote:

How i find it is there is a website to cross check if our intel hex is correct 


You could start by reading Wikipedia with all relevant information about the IntelHEX format (including checksum calculation).

Or you simply seach for "intel hex format converter" to find a list of suitable websites…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(127 Views)

Thanks everyone for the help .It worked at the end

 

0 Kudos
Message 8 of 11
(114 Views)

@altenbach wrote:

 

There is a similarly named obscure ancient data encoding format. If this is what they want it can be implemented, of course.


I wouldn't call this particularly obscure- it's still used to program a lot of embedded devices. I'm pretty sure the Arduino uses it, for example. Very, very few people would need to manually generate one, but it's still used quite a bit behind the scenes in some industries. (It's definitely ancient though :D)

0 Kudos
Message 9 of 11
(74 Views)

@BertMcMahan wrote:
I wouldn't call this particularly obscure- it's still used to program a lot of embedded devices.

Somehow my first few results from google were not that obvious and we weren't even sure if it is "intel" or "intex". 😄

I am glad it is solved....

0 Kudos
Message 10 of 11
(64 Views)