D:P:S for NXF Card Frame
I'm a 3-month old AMX programmer, been through Programmer I, but haven't ever had to assign D:P:S to a Card Frame until now. Can someone verify that I'm assigning addresses correctly?
I've got an NXF Card Frame with cards in frames 1(COM), 2(COM), 3(COM), 4(COM), 6(REL), 7(IR), 8(IR), 9(VOL) & 10(VOL).
I'm setting the DIP Switch to 25, and assigning the D:P:S addresses as follows (this is the 2nd system on this project):
Card 1 - 301:1:2, 301:2:2
Card 2 - 302:1:2, 302:2:2
Card 3 - 303:1:2, 303:2:2
Card 4 - 304:1:2, 304:2:2
Card 6 - 306:1:2, 306:2:2, 306:2:3, etc., through 306:10:2
Card 7 - 307:1:2, 307:2:2, 307:3:2, 307:4:2
Card 8 - 308:1:2, 308:2:2
Card 9 - 309:1:2, 309:2:2, 309:3:2, 309:4:2
Card 10 - 310:1:2, 310:2:2, 310:3:2, 310:4:2
I won't be able to test this on the unit for several days, just wanted to verify that the code good for the first test run. Any feedback is greatly appreciated.
I've got an NXF Card Frame with cards in frames 1(COM), 2(COM), 3(COM), 4(COM), 6(REL), 7(IR), 8(IR), 9(VOL) & 10(VOL).
I'm setting the DIP Switch to 25, and assigning the D:P:S addresses as follows (this is the 2nd system on this project):
Card 1 - 301:1:2, 301:2:2
Card 2 - 302:1:2, 302:2:2
Card 3 - 303:1:2, 303:2:2
Card 4 - 304:1:2, 304:2:2
Card 6 - 306:1:2, 306:2:2, 306:2:3, etc., through 306:10:2
Card 7 - 307:1:2, 307:2:2, 307:3:2, 307:4:2
Card 8 - 308:1:2, 308:2:2
Card 9 - 309:1:2, 309:2:2, 309:3:2, 309:4:2
Card 10 - 310:1:2, 310:2:2, 310:3:2, 310:4:2
I won't be able to test this on the unit for several days, just wanted to verify that the code good for the first test run. Any feedback is greatly appreciated.
0
Comments
Ed,
As Alex indicated, the dipswitch setting of 25 (dip pins 1, 4, and 5 on, all else off) is correct for an initial card address of 301. The only other observation has to do with the system component of your DPS. When you say the 2nd system of the installation, do you mean the Master has been set to System Number 2? If so, then your DPS for the devices is correct as stated. You could have a second system and use any unique system number you desire provided it is different from other system numbers used on the same network.
In general, most Netlinx programs reference locally attached devices using System 0 which means the system associated with the Master. That way, you can change the system number but the program won't have to change. Specific (non-zero) system values are generally used when referencing devices that are physically attached to remote systems where Master-to-Master communication is used for remote device access.
Hope the information is useful.
For example, I have an NXF-MINI connected via ICSNet to an NI-3100 addressed as System 1.
The card frame is at the factory default device number of 0. The two cards I have loaded in the NXF-MINI show up fine in System One's online device tree with the default device numbers of 00001 and 00002.
How would I define the devices connected to the two cards in programming?
If I don't change the defaults, I could conceivably define a device connected to the first port of a card in its first slot as:
DEV = 1:1:1
However, the master would likely think that device was connected to the first serial port on the NI-3100.
If I set the dip switches on the NXF-MINI to device number 255, do I define a device connected to the first port of a card in its first slot as:
DEV = 3061:1:255
or something else?
The system number for all the devices is 1. All devices attached to one master have one and only one system number. Typically and unless you take steps to change it, the built-in device on a Netlinx master has the device number 5001. So, the first serial port on the master is:
5001:1:0
the second serial port on the master is port number two on that device:
5001:2:0
An NI2100 has three serial ports which are ports 1-3 on device 5001. Port 4 on device 5001 is the relays. So, you control the relays by communicating with 5001:4:0
Even though the cardframe will have unique device numbers if you set it so the first slot is device 1, it is customary to reserve device numbers 1 - 255 for axlink devices. If you set it up as you describe the default, the first card slot would be 1:1:0. The second would be 2:1:0, and so on. If you set it so that the first card slot is device 3061, then the first card slot is 3061:1:0, the second is 3062:1:0, etc.
Don't forget that with netlinx devices, you have to distinguish between ports and channels. A serial card for a netlinx cardframe has two serial ports. If the cardframe is setup as you describe with device 3061 being the first card slot then the two serial ports on a serial card plugged into the first slot would be:
3061:1:0
and
3061:2:0.
A IO card or a relay card will occupy only one port but will have multiple channels. So, if a relay card is plugged into slot 1, you would use 3061:1:0 and control the individual channels on that device.
Although it is possible to write code including the actual system number even when you are not using master-to-master communication, it is customary and very important (in my opinion) that when you are controlling a device physically connected to the master that the code is being loaded to that you use system 0 instead of the actual assigned system number.
For example, with your NI3100, when you write code that will reside on that master and will control devices attached to that master, use system #0. Your serial ports might be defined in the define_device section like so:
dvSerialPort1 = 5001:1:0
dvSerialPort2 = 5001:2:0
and so on.
Only use the actual assigned system number when you want to control a device on another master. Your life will be a lot easier.
Personally, I like a dip switch setting of 25 which gives you device numbers starting with 301.
You might rest happy knowing that, with your help, I should be able to get a client's Karaoke system working for a dinner party he's having for his boss tonight!
However, your answer revealed another conundrum.
The Netlinx card frame manual to which you refer does indeed state that the device address range is 12-3060 (thank you for reminding me about that document!).
Curiously, the Quick Start guide for the NXF-MINI states:
Either the dip switches work differently in the two devices, or the author of the original manual simply neglected to consider the case where all the DIP switches were left in the default OFF position.
My guess is that, for the NXF-MINI at least, the card frame dip switches left in the default position (all off) yield a device number 0 for the card frame. The card device numbers then can start at (Card Frame device number (0)+1)) or 1.
That's certainly possible. Like a lot of things with the AMX systems, the only way to know for sure is to try it. Just so long as you don't have multiple physical devices with the same number, when you get the system up and running, you can see the device numbers in Netlinx Studio.
I just set the first DIP switch on, and named my devices as follows:
Now there is much drunken revelry.