Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Problem with instanced

libi
2021-12-15
2021-12-15
  • libi - 2021-12-15

    I don't understand what codesys want me to do I tried do declare a variable for USB_STORAGE_HANDLER and it's still not working (I don't want it to work with a function block i want that to work in ST)

     
  • Lo5tNet - 2021-12-15

    Copy_Device_To_USB is a function block and must be declared. So in your VAR section you would do something like:

    VAR
       FB_CopyDeviceToUSB:  ifmFileUtil.Copy_Device_To_USB;
    END_VAR
    
    //Then call FB_CopyDeviceToUSB to access function block
    FB_CopyDeviceToUSB(.....);
    

    Hope this helps.

     

Log in to post a comment.