RobotStudio event

Flexpendent output to a file

Is there any way to store the flex pendent outputs to a textfile?

Comments

  • lemster68
    lemster68 ✭✭✭
    What type of output?  Errors, warnings?
    Lee Justice
  • The outputs that comes in the flex pendent console. That is output of TPRead,TPWrite etc.While execution, we can only see it in the flex pendent console. Is there any way to store that TPWrite and TPRead outputs to a file for future reference?
  • Yes there is. You can write to a Logfile a storage device as .txt, .csv, .xls. 

    You will probably have to do it through a trap routine or if you a multitasking system you can let it run in the background.
  • Task1

    MODULE MODULE1
    PROC MAIN()
    TPWrite"MAIN PROGRAM1";
    TPWrite"MAIN PROGRAM2";
    TPWrite"MAIN PROGRAM3";
    TPWrite"MAIN PROGRAM4";
    TPWrite"MAIN PROGRAM5";
    ENDPROC
    ENDMODULE

    Task2(Background Task)

    MODULE MODULE1
    PROC MAIN()
    TPWrite"BACKGROUND PROGRAM1";
    TPWrite"BACKGROUND PROGRAM2";
    TPWrite"BACKGROUND PROGRAM3";
    TPWrite"BACKGROUND PROGRAM3";
    TPWrite"BACKGROUND PROGRAM4";
    ENDPROC
    ENDMODULE

    If these are my two tasks one is foreground and one is background task.Then I will get the flex pendent output like all the statements inside main of Task1 followed by all the statements inside main of background task. I need these same outputs to a file as we get in the same order as in flex pendent console.I used Write to a file option in both the tasks using "Write".But the order in which the output comes in the file was different from the order in the flex pendent console. Is there any other way of writing the flexpendent output(just outputs of TPRead and TPWrite ) to a file? If there is a way, can you just explain with my code above? 
  • lemster68
    lemster68 ✭✭✭
    If you read this:

    https://www.robot-forum.com/blog/entry/4-another-program-that-writes-a-program/

    You will see several examples of writing to files.
    Lee Justice