Help in "Hello world" program
lighting
Junior Member
I'm newby in AMX programming and can't understand meaning of address port, address code, channel port and channel code. As i understand channel code mean feedback (if channel feedback setup in TP4) and address port mean address, for push/release events, but what meaning of last two properties i don't understand, could anyone explain this for me please or show exact place in help.
I try to write sample project place a button on page, setup feedback in "channel", address port in "1", channel port in "1" and channel code in "2"
Then i wrote event handler:
BUTTON_EVENT[dvTP,1]
{
PUSH:
{
[dvTP,2] = ![dvTP,2]
}
}
this must programm button to work like trigger, but when i press a button nothing changed. Where did i mistaken?
I try to write sample project place a button on page, setup feedback in "channel", address port in "1", channel port in "1" and channel code in "2"
Then i wrote event handler:
BUTTON_EVENT[dvTP,1]
{
PUSH:
{
[dvTP,2] = ![dvTP,2]
}
}
this must programm button to work like trigger, but when i press a button nothing changed. Where did i mistaken?
Comments
-
Welcome!
First Channel Codes are for feedback and button events.
Address Codes are for variable text
AMX works on the D:P:S concept Device:Port:System
The System part is easy - each Netlinx Master is a system and has a unique system no. zero means "this system"
Each master has different Ports - think of the connectors on the back - The RS232 connectors are ports 1-7 on a NI3100 and the first IR output is port 9
The device part is a ID for the physical device. so the Master could be 5001, and a TP could be 10001. There are ranges of device ID's for different products. so TP2 could be 10002 etc
to create a device in code we reference the DPS with a Name:
dvIR1 = 5001:9:0 // 5001 (Master): Port 9 (IR Out 1): System 0 (This System)
The first issue with your example is your waiting for TP Button 1 (channel 1) to fire the event, but your TP button is set to channel 2. In TP4 you should have Channel port =1 and channel code =1 for button #1. You don't need an address port or code.
If you set the Channel Port to 2 then you'd need to assign your TP in Netlinx as dvTP_Port2 = 10001:2:0 rather than 10001:1:0 -
Jimweir192, thank's for quick and clear explanation. I reply when chek your advice on a real system.
-
thanks a lot, all work fine
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums