Is there any way to use the ArEventlog library to write in the old error numbers (for example from the FileIO library).
I’m writing a function block that does some directory path creation/intialization, and if I get an unexpected File IO error, I want to write the FileIO library error into the logbook.
In AS 4.x, there may have been a workaround to write them with AsArLog, but that doesn’t exist in 6.0. I’m stuck writing a bunch of custom error numbers or using them as a piece of data into a UserLog entry?
you could use the error number as the code part of the event id:
The code part of event id accepts UINT value, but the event id has to be decoded to see the error number directly (I’m not 100% sure, but I think that the AS logger has a view that shows the decoded event id).
Or you just write the error number as string into the additional data of your logger entry using ArEventLogWrite.addData ( B&R Online Help).