AMX Netlinx Port Assignment Issues
Frequently Asked Questions
Table of Contents
Brand:
- AMX
Models:
- Programming
Question:
Why won't my IP port assignments compile correctly?
Answer:
Port Assignment Symptoms
Issue 1: Multiple IP ports in a Netlinx system are typically defined in the following manner:
- IPDEV1 = 0:FIRST_LOCAL_PORT:0
- IPDEV2 = 0:FIRST_LOCAL_PORT+1:0
- IPDEV3 = 0:FIRST_LOCAL_PORT+2:0
But if there is a data event for IPDEV2 or IPDEV3 when compiling, the following error will occur:
- ERROR: Internal Error: Major system error occurred during code generation Line: 0 Col: 0
Issue 2: If large port numbers are used:
- IPDEV1 = 0:9099:0
You may find that the master will not run its program at all and will simply give a solid green status LED indication. You must disable the program by turning on Dipswitch 1 on SW1 on the Netlinx master and rebooting before you can reestablish communications with the master.
Port Assignment Cause
Issue 1: The compiler cannot resolve the reference to a DEV, which was created using math, at compile time.
Issue 2: The master must allocate all ports up to, and including, the largest port number declared in the code. With larger port numbers memory is rapidly consumed and eventually there is not enough memory to run code.
Port Assignment Resolution
Issue 1: The interpreter can resolve the DEV, so use the following syntax:
- DATA_EVENT[0:IPDEV2.PORT:0] //THIS COMPILES
instead of
- DATA_EVENT[IPDEV2] //THIS DOES NOT COMPILE
Issue 2: Use incremental port numbers. Do not allocate port numbers larger than is necessary for the program.