6/12/2024 5:05 AM | |
Joined: 10/31/2005 Last visit: 9/4/2024 Posts: 366 Rating: (31) |
Hello, I have a DB created from UDT that has variables of different data types (booleans, bytes, even reals). I'd like to make a stream (an array) of bytes, so I'm looking at Serialize data block. Can someone provide an example on how this can be done (if it can be done)? For example even if I have bool variable, I would take a whole byte. So as a first step, I need to calculate size of the DB in bytes and then to declare an array of that size to be used as an output from Serialize block. Any advice is appreciated. Attached, is shown my try with Serialize data block (for CPU s7-1500), but there is a compile error because of the data type mismatch. Basically I tried to follow this https://www.youtube.com/watch?v=g4KtE5n1JHo YT video done for S7-1200 CPU. Thank you! |
Last edited by: Pandiani at: 06/12/2024 06:06:18Last edited by: Pandiani at: 06/12/2024 06:07:40 |
|
6/12/2024 10:25 AM | |
Joined: 10/31/2005 Last visit: 9/4/2024 Posts: 366 Rating: (31) |
Yes, it works by Drag/Drop, but why? Why it cannot work by just typing on the inputs? |
6/12/2024 12:39 PM | |
Joined: 10/31/2005 Last visit: 9/4/2024 Posts: 366 Rating: (31) |
Many thanks, all clear! |
Follow us on