Announcement

Collapse
No announcement yet.

Help exporting user data types

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Frontier
    replied
    Okay, I can make that work. Kinda clunky, but I get the reasoning behind it. Thanks for your help!

    Leave a comment:


  • franji1
    replied
    There is no good way of generating unused elements. The best thing to do is create a MOVE instruction for each UDT field.

    I created a UDT and a block called MyBlock 256 long. The UDT struct has a REAL .Temperature field and SIGNED DWORD .CookTime field. I created 2 MOVEs, one referencing the fields in MyBlock0:

    Click image for larger version

Name:	MOVEUDT2.png
Views:	64
Size:	6.4 KB
ID:	119321

    Export in C-more format WITH Struct Fields, CHECKING the Also export USED elements.


    Then use Notepad to edit that .CSV file (not Excel). Look at the bottom of the export file and you will see a section like this:

    #BEGIN DM_NICKNAMES B3FE4E54
    // nickname, data-type, DM-element, User-BuiltIn-Block-Heap-Type, block-name-or-heap-item-name
    ,FLOATING_PT_32,MyBlock0.Temperature,UBLOCK,MyBloc k
    ,SIGNED_INT_32,MyBlock0.CookTime,UBLOCK,MyBlock
    #END

    Copy the
    ,FLOATING_PT_32,MyBlock0.Temperature,UBLOCK,MyBloc k
    ,SIGNED_INT_32,MyBlock0.CookTime,UBLOCK,MyBlock
    and Paste it INITIALLY JUST A COUPLE TIMES BEFORE the #END, then tweak the ID
    for each from MyBlock0 to 1, 2. It should look something like this:

    #BEGIN DM_NICKNAMES B3FE4E54
    // nickname, data-type, DM-element, User-BuiltIn-Block-Heap-Type, block-name-or-heap-item-name
    ,FLOATING_PT_32,MyBlock0.Temperature,UBLOCK,MyBloc k
    ,SIGNED_INT_32,MyBlock0.CookTime,UBLOCK,MyBlock
    ,FLOATING_PT_32,MyBlock1.Temperature,UBLOCK,MyBloc k
    ,SIGNED_INT_32,MyBlock1.CookTime,UBLOCK,MyBlock
    ,FLOATING_PT_32,MyBlock2.Temperature,UBLOCK,MyBloc k
    ,SIGNED_INT_32,MyBlock2.CookTime,UBLOCK,MyBlock
    #END

    Then try to IMPORT it into C-more to make sure it works. If it works, then do it for ALL the IDs that you need.

    Don't forget to delete the MOVE instructions

    Leave a comment:


  • Frontier
    started a topic Help exporting user data types

    Help exporting user data types

    I'm working on a BRX program with a few user data types. I'm sure I'm missing something obvious, but is there any way to export an entire range of data types or memory types so I can import them without a nickname in the C-More program? I'm using a FOR loop to handle work within the data types, so according to the Documentation Editor, the memory blocks I've created with the types I've created aren't in use, as I'm not addressing them directly in the program.
Working...
X