Vishay Micro-Measurements
System 7000 Programmer’s Reference Manual
Page 52 of 142
4 SYSTEM STATUS AND ERROR HANDLING
The System 7000 provides two methods for monitoring the status and error information. You may query
the system via TCP commands or you may monitor the UDP Event port.
The advantage of querying for status information is that it is typically easier to implement
programmatically. The disadvantage is that if you too frequently query the status information you will
significantly degrade the performance of the System 7000.
The alternative is monitoring the UDP Event Port for status information. This typically involves setting
up a background task (or similar) to monitor the port. The advantage is that you are not burdening the
system with a large amount of TCP traffic and its performance will remain at an optimal level.
4.1 Error Handling
There are several different methods of programmatically handling errors and tracking the status of your
System 7000.
Command / Query Responses
When a command or query is passed to the System 7000 a response is returned indicating if the
command is successful (ACK) or if it failed (NAK). If the command failed, an error number is
returned indicating the cause of the failure. You should always perform the appropriate error
handling on command responses.
LabVIEW
Each VI uses the standard “error output” indicator. Any
errors detected in a command response will be reported in
this indicator.
Active X
Most methods return a result status. If the result is 0, then
the method was successful. If an error is detected in a
command response, the error number is passed as the
result. The last result status is also found in the
LastErrorCode property. Every method updates this
property. LastErrorCode=0 indicates No Error. Other
values represent error codes.
Low-level
You must monitor the TCP port for the command response.
Each response will indicate an ACK or a NAK.
Event Messages
Event (error or status change) messages are also broadcast over the UDP Event/Status Port.
There is more information on monitoring these messages later in this section.
Error Log
The System 7000 also maintains an error log file (“Error.Log”) on each card and on the control
module. It is possible to download this file and examine the contents. It is maintained as a
standard, ASCII text file. A snippet from an error log file is shown below. Each line is
terminated by a linefeed character (0x0A).
08/01/2008 00:00:25 Error Code = 165, Cannot initialize date and time
08/20/2008 18:40:28 Error Code = 55, Cannot open or read file for transfer
LabVIEW
Retrieve File VI
Active X
RetrieveFile() method
Low-level
You may start the retrieval of the error log file with the
Retrieve File command. You must also monitor the data
port for the file contents.