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

the question about file.open and so on

skytianlin
2014-05-25
2014-05-26
  • skytianlin

    skytianlin - 2014-05-25

    hi FAE
    the question I faced was that I want to save the interpolator points being output by FBD into a document for txt. and then plot these points to a curve line by tool of Excel or Matlab. so how can I do it? expect to your replay!

     
  • eschwellinger

    eschwellinger - 2014-05-25

    Hi,

    would recommend to use:
    SMC_AxisDiagnosticLog from sm3_basic library
    Execute the fb in the motion task:
    Example:

    SMC_AxisDiagnosticLogInstance(bExecute:=TRUE ,bCloseFile:= FALSE,sFileName:= 'schreibs_da_rein.txt',
    bSetPosition:= TRUE,bActPosition:=TRUE,bSetVelocity:= TRUE,bActVelocity:=TRUE,
    bSetAcceleration:=TRUE, bActAcceleration:= TRUE,Axis:=Drive);

    additional needed is to call the file writing in an file task

    PLC_PRG.SMC_AxisDiagnosticLogInstance.WriteToFile(Axis:=Drive);

    BR
    Edwin

     
  • skytianlin

    skytianlin - 2014-05-26

    thanks for your replay. and sorry for that our version don't include this function. if I want to save these interpolator points into an array firstly, and then save the array to a TXT. How to do?

     

Log in to post a comment.