Read identifier – Sensoray 417 User Manual
Page 26

25
Sensoray Model 417
Chapter
4
Programming
Read Identifier
This command returns a product identifier specific to the Model 417 board. The command
response consists of the decimal value 417.
COMMAND: (224), (4), (0)
RESPONSE:
(1), (161)
This command is useful both as a diagnostic and as a mechanism for automating the determination
of the product type residing at a particular port address.
VB Code Example:
‘**********************************************************************
‘ This function returns the coprocessor product identifier.
‘**********************************************************************
Function GetProductID%(BasePort As Integer)
Call SendByte(BasePort, 224)
Call SendByte(BasePort, 4)
Call SendByte(BasePort, 0)
GetProductID = ReadWord(BasePort)
End Function
‘******************************************************************
‘ Fetch the coprocessor product identifier. In the case of Model
‘ 417, the returned ProductID value should be decimal 417.
‘******************************************************************
Dim ProductID As Integer
ProductID = GetProductID(BaseAdrs)