Hey everyone! I'm trying to generate CNC files for my plate punching machine, but I'm running into an issue with the file headers. These files are plain text and creating the CNC code itself is straightforward. However, each file has a header that I suspect is a hash of the content, but I'm not sure of the exact format they use. I've tried several online CRC and hash checkers, but they don't match the header I see. Does anyone know what format I should be looking for? Just to give you some context, this is specifically for Ficep CNC machines. Here's an example of what one of the files looks like:
"""
d451301a2efd3a2d637afb3f3a82657e
[[MAT]]
[MAT] M:A36 CM0 WS7.860
[[PCS]]
[HEAD]
C:40154 D:E50381 N:E50381
M:A36 CP:P P:PLACA
LP290.000 SA203.000 TA6.000
QI72 SCA101
[HOL] TS11 DC17.500 X260 Y30
[[PCS]]
[HEAD]
C:40154 D:E50381 N:E50381
M:A36 CP:P P:PLACA
LP290.000 SA203.000 TA6.000
QI72 SCA101
[HOL] TS11 DC17.500 X260 Y30
"""
2 Answers
I also hit a wall trying to figure this out. Here are a few things you might want to consider: when I copied your example, I noticed extra newlines. Were those there when you created the hash? Have the line endings been altered afterward? And was there a trailing newline when hashing? It could even be a custom hashing method they've set up. Also, has anyone checked if this format is called "NC" or "NC1"? Just a thought!
You might want to double-check that you're only using the CNC code when hashing and leaving out that hash. Usually, a hash can't include itself. Also, not all hash functions are the same, so it might not be as simple as using a standard algorithm. If the machine is generating the files, the hash could even be something unique for its internal purposes!
I pasted it without the header, but I think the hash is for checking content integrity.
I noticed a blank line after the header too, and it seems like it should have only a single newline after each line. I’m also concerned they might be using a secret hash key, which would complicate things.