Home AMX User Forum NetLinx Studio

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.

Comments

  • alexanboalexanbo Posts: 282
    Looks ok to me. There's a program called Dipswitch available through Netlinx Studio\Tools that will tell you the dip switch settings and what they mean.
  • DPS for NXF Cardframe

    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.
  • Thanks for the tips. Yes, it's the 2nd system, it talks to the 1st system (someone else is handling that one) via ICSNet.
  • Should a NXF Mini Card Frame with no master card have the same system number as the system to which it is connected ? Or is the card frame's device number the same as its system number?

    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?
  • HedbergHedberg Posts: 671
    AVOPHILE wrote:
    Should a NXF Mini Card Frame with no master card have the same system number as the system to which it is connected ? Or is the card frame's device number the same as its system number?

    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.
  • HedbergHedberg Posts: 671
    I just looked at the manual for the Netlinx cardframes and it implies to me that it is not possible to use a dipswitch setting of 0. It appears that the valid settings are 1 - 255 which gives a device number range for the first slot of 13-3061. So, if you try to set the device number of the first slot to 1, you might have problems.

    Personally, I like a dip switch setting of 25 which gives you device numbers starting with 301.
  • Thank you for the rapid and detailed response clarifying the use of system numbers with Netlinx CardFrames, Mr.Hedberg.

    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.
    Hedberg wrote:
    I just looked at the manual for the Netlinx cardframes and it implies to me that it is not possible to use a dipswitch setting of 0. It appears that the valid settings are 1 - 255 which gives a device number range for the first slot of 13-3061. So, if you try to set the device number of the first slot to 1, you might have problems.

    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!).
    The 8-position CardFrame Number DIP switch, located on the rear of the CardFrame (FIG. 1 on page 1), sets the starting address (the device number in the D:P:S specification) for the Control Cards installed in the CardFrame. The address range is 12-3060. The formula for setting the starting address is:

    (DIP switch value) + Card slot Number (1-4) = Card Address

    Curiously, the Quick Start guide for the NXF-MINI states:
    The 8-position CardFrame Number DIP switch, located on the lower-left rear of the CardFrame, sets the starting address (the device number in the D:P:S specification) for the Control Cards installed in the unit.
    The Control Card address range is 1-3064. The factory default CardFrame DIP switch value= 0 (All CardFrame DIP switches in the OFF position).

    The formula for setting the starting address is:
    (DIP switch value) + Card slot Number (1-4) = Card Address

    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.
  • HedbergHedberg Posts: 671
    AVOPHILE wrote:

    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.
  • Thanks again!

    I just set the first DIP switch on, and named my devices as follows:
    dvPlasma      = 	 13:1:0		//first port on serial card in first slot
    dvPOWR1     =          13:2:0	       //second port on serial card in first slot
    dvKAR	       =	  14:1:0	  //first port on ir card in second slot	
    

    Now there is much drunken revelry.
  • DHawthorneDHawthorne Posts: 4,584
    Device 0 can only be assigned to masters.
Sign In or Register to comment.