Hi Todd++
Welcome to the forums. I’ve got a few questions of my own to make sure I’m getting you the answer(s) you need. I suspect you just need to click your heels together 3 times and search form 1465 for the phrase “unit type.” (I also think your version of that doc might be older than the PDF I find today on the website, because the function you mention is on a slightly different page.)
That function reads address F030 0020 which could currently be one of these (more hardware types are sure to be added in the future), as shown on page 119 of the current Appendix – Status Area Read—Read Only:
[LEFT][SIZE=1]0x00000052 = OPTOEMU-SNR-DR2[/SIZE]
[SIZE=1]0x00000056 = OPTOEMU-SNR-DR1[/SIZE]
[SIZE=1]0x00000058 = G4EB2[/SIZE]
[SIZE=1]0x0000005A = OPTOEMU-SNR-3V[/SIZE]
[SIZE=1]0x0000005C = SNAP-PAC-SRA[/SIZE]
[SIZE=1]0x00000062 = SNAP-PAC-SB2[/SIZE]
[SIZE=1]0x00000064 = SNAP-PAC-SB1[/SIZE]
[SIZE=1]0x00000066 = SNAP-PAC-R2-W[/SIZE]
[SIZE=1]0x00000068 = SNAP-PAC-R1-W[/SIZE]
[SIZE=1]0x0000006A = SNAP-PAC-S1-W[/SIZE]
[SIZE=1]0x0000006C = SNAP-PAC-S2-W
0x00000070 = SNAP-PAC-EB2-W
0x00000072 = SNAP-PAC-EB1-W
0x00000074 = SNAP-PAC-EB2
0x00000076 = SNAP-PAC-EB1
0x00000078 = SNAP-PAC-R2
0x0000007A = SNAP-PAC-R1
0x0000007C = SNAP-PAC-S1
0x00000083 = SNAP-ENET-S64
0x0000008A = SNAP-UPN-ADS
0x0000008C = SNAP-UP1-M64
0x00000092 = SNAP-UP1-D64
0x00000093 = SNAP-UP1-ADS
0x00000094 = SNAP-WLAN-FH-ADS
0x00000097 = SNAP-ENET-D64
0x00000098 = SNAP-B3000-ENET or SNAP-ENET-RTC
0x000000E1 = E1
0x000000E2 = E2
0x00000193 = SNAP-LCE[/LEFT]
[FONT=Verdana][SIZE=2]But I doubt you need all that. Do you have PAC Manager installed? Are you connected to a network with all your Opto 22 devices on it? If so, you can use the “find” feature by selecting the menu option: Tools > Find Opto MMP Devices then click the “Find” button. [/SIZE]
The resulting list includes this “Unit Type” column on the right. I’m guessing the number of hardware types you’ll need to support will be a much shorter list.
[SIZE=2]Also, while you’re in the “Status Read” section of the Appendix, you might want to check out some other values that could be useful to you for figuring out what kinds of hardware you’re talking to. For example, as you can also see in PAC Manager if you go to: Tools > Inspect and click “Status Read” (then scroll down a little) there’s this value:
0xFFFF F030 007C Smart Modules Present 0x009C (analog, serial, etc.)
If the device I read this from had no analog modules installed on the rack, that value would’ve been 0. Instead, I’m looking at a bitmask representing where I do have analog/serial or high-density modules plugged in. Since that 0x009C is 10011100 in binary, reading from the right I know I have those modules in slots 2, 3, 4, & 7. Unfortunately, there’s currently no value in the memory map indicating where you have a 4-channel digital module plugged in – does look the same as an empty slot.
Hope that helps. Can you tell us more about what you’re doing? Sounds interesting! If
you’re limiting options for user selections, do you need to worry about future types of hardware that could be added into the system later? There might be ways we could help future-proof your code so it’ll still work when you expand…
-OptoMary[/SIZE][/FONT][/SIZE]