EasyManua.ls Logo

Cognex DataMan - Function Onresult; Function Ongenerateftpfilename; Decoderesult Object; Decode Result

Cognex DataMan
76 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Output
Event
See the detailed description of the related objects below.
Function onResult
This is the event handler for decode events, with zero, one or more decoded results.
Property Type Description
decodeResults
DecodeResult[] Input, an array of DecodeResult objects. One decode result will hold all
information related to that decode attempt.
readerProperties
ReaderProperties Input, the reader properties not tied to the actual decode result.
output
Output Output, the object which needs to be updated to modify the output
string or raise events.
Function onGenerateFTPFilename
The name of the file to be sent to the FTP server can be generated with this function.
Property Type Description
decodeResults
DecodeResult[] Input, an array of DecodeResult objects. One decode result will hold all
information related to that decode attempt.
readerProperties
ReaderProperties Input, the reader properties not tied to the actual decode result.
output
Output Output, the object which needs to be updated to modify the output
string or raise events.
The file name of the image to be uploaded is taken from the string return value of the script. For example:
function onGenerateFTPFilename(decodeResults, readerProperties, output)
{
var ftp_filename = readerPRoperties.name + "-";
ftp_filename +=readerProperties.trigger.index + "-" + decodeResults
[0].image.index;
return ftp_filename;
}
function onGenerateFTPPCMReportFilename(decodeResults, readerProperties, output)
{
var ftp_filename = readerPRoperties.name + "-";
ftp_filename +=readerProperties.trigger.index + "-" + decodeResults
[0].image.index;
return ftp_filename;
}
DecodeResult Object
The following tables list the details of the DecodeResult object, its types and properties.
Decode Result
Describes the details of one decoded result.
Property Type Description
decoded
boolean True if decoding was successful.
content
string The (raw) read result.
29
DataMan Application Development

Table of Contents

Other manuals for Cognex DataMan

Related product manuals