mmmmgggg

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Everything posted by mmmmgggg

  1. Hello, I am using FileWriteVar function to save in a file the value of an array. I have read in the documentation that this data is saved in binary format. Can I see this data saved in the file in a human format? It doesn't matter using Wordpad, Excel, Internet online converter... What's the decodification type of this file? For example, when you import a file in Excel it asks you if it is Unicode (UTF-8), European, Arabian... Thank you for your help!
  2. Hi @pturmel I see very interesting what are talking about python struct. I have tried with some code samples found on Internet, but I don't get the result that I want. For example with this code sample: import struct f = open(r"C:\Users\user\Desktop\RECIPE_001.dat", 'rb') data = f.read() data_unpack = struct.unpack('>f?7s', data) print("data_unpack: ", data_unpack) f.close() I get the next error: struct.error: unpack requires a buffer of 12 bytes Do you know what I need to write instead of '>f?7s' regarding to the file extracted from Sysmac? Thank you!
  3. Hello! Thank you for your answer! I was saying that I didn't want to convert to string directly from Sysmac because my variable is not a simple real; the variable that I'm writing in a file is a structute created  by me composed by strings, array of reals, array of booleans, booleans... But I understand that I can't open the output file of FileWriteVar in a human readable format unless I don't convert each element to a string.
  4. Hi! First of all, thank you for your response. I have tried converting my binary file extracted from Sysmac in the webpage https://www.rapidtables.com/convert/number/binary-to-ascii.html (the binary file extracted with the function FileWriteVar) but I don't receive the response that I wanted. The array that I want to save is a recipe, so I don't want to start concatening the elements and converting to string and things like this, because then, I want to use the same file with FileReadVar function to return to the past values in Sysmac.