Discussion

FAQ - Frequently asked Questions about CODESYS
FORUM LATEST POST # TOPICS
Sparkplug B for MQTT Discussion

Forum about anything you want to talk about.

Implement only basic metrics (advanced metric features = later milestone's)
by aliazzz
2020-07-07
11

Recent Activities

    Home Project for CODESYS Forge

  • nothinrandom nothinrandom posted a comment on discussion Runtime

    @Ingo, I tried using datatype ANY at first. However, we're not allowed to have something like ARRAY[1..10] OF ANY_NUM or POINTER TO ARRAY[1..10] OF ANY_NUM, so it can only be ANY_NUM inside VAR_INPUT. I am not sure how we could provide sorting in this scenario. Is it possible to move this thread into Engineering?

  • Ingo Ingo posted a comment on discussion Runtime

    Hi guys! I guess it is due to the high cost of the CASE within the loops. Another interfacing idea was, to use the ANY datatype: https://forge.codesys.com/tol/iec-snippets/snippets/8/ Then, to optimize the swapping, I would avoid the CASE, and just copy the elements by size (which is defined already by ANY). What do you think? Cheers, Ingo

  • Morberis Morberis modified a comment on discussion Engineering

    Hmmm. I'm testing it on an embedded windows PLC so I changed /media to /UsbStorage and changed it so that DirEntry.sEntry checks for 'System Volume Information' and it correctly detects whether there is a USB drive or not. However it seems to get stuck sometimes with DirOpen and doesn't reset if it hits an error.

  • Morberis Morberis modified a comment on discussion Engineering

    Hmmm. I'm testing it on an embedded windows PLC so I changed /media to /UsbStorage and changed it so that DirEntry.sEntry checks for 'System Volume Information' and it correctly detects whether there is a USB drive or not. However if at any point you try to detect a USB drive and there is no USB drive it seems to get stuck.

  • Morberis Morberis posted a comment on discussion Engineering

    Hmmm. I'm testing it on an embedded windows PLC so I changed /media to /UsbStorage and changed it so that DirEntry.sEntry checks for 'System Volume Information' and it correctly detects whether there is a USB drive or not. However if at any point you try to detect a USB drive and there is no USB drive it seems to get stuck with xDoneOpen never going TRUE

  • Morberis Morberis posted a comment on discussion Runtime

    To do that would you need to be using either a cape or power supply that has UPS functionality and can has an output indicating that power has been cut?

  • Ingo Ingo posted a comment on discussion Runtime

    The standard is to shut down cleanly on power fail. If this is not possible, you can call AppStoreRetains from the CmpApp library at any time.

  • Ingo Ingo posted a comment on discussion Forge

    From my experience, it could either be the layout of the struct which doesn't match the json file, or characters / sizes of the members in the json file, which are not supported (yet). Maybe you could share a codesnippet, json file and then the content of the struct (to see if some members were initialized).

  • dFx dFx modified a comment on discussion Runtime

    Had a look at OSCAT basic, which is implementing quicksort in ARRAYSORT (REAL datatype only). it's faster on simulation, sorting 10000 random items is averaging 1ms while my code produces 7ms. Maybe that's due too the good use of cpu caching by C&D. That would be great to have some measurements on a real PLC. Or maybe that's worthless reinventing what's already written down ๐Ÿ˜‚

  • dFx dFx posted a comment on discussion Runtime

    Had a look at OSCAT basic, which is implementing quicksort in ARRAYSORT (REAL datatype only). it's a faster on simulation, sorting 10000 random items is averaging 1ms while my code produces 7ms. Maybe that's due too the good use of cpu caching by C&D. That would be great to have so measurement on a real PLC. Or maybe that's worthless reinventing what's already written down ๐Ÿ˜‚