Passing IP Address to a Netlinx Module
tpeery
Junior Member
Does anyone have any example of how to pass an IP address to a Netlinx Module?
Comments
-
DEFINE_VARIABLE char cMY_IP[] = '192.168.1.125' define_module 'MyModule' instance1 (cMY_IP)
Is that what you are asking for? -
DEFINE_VARIABLE char cMY_IP[] = '192.168.1.125' define_module 'MyModule' instance1 (cMY_IP)
Is that what you are asking for?
I have defined my ip address in my define module like this.
(dev vdvprojector, dev dvprojector,dev dvtp, char lamp_hour_text_field, CHAR projector_ip)
Then in my main program I have defined like this
comm(vDVMON1,DVPROJECTOR1,dvtp,14,projector_1_ip)
What I get in the complier is that the char of projector_1_ip is that it is an expression.
Any ideas? -
Both amp_hour_text_field and projector_ip are being declared as single byte character variables. You want to make them into an array of appropriate length.
Change(dev vdvprojector, dev dvprojector,dev dvtp, char lamp_hour_text_field, CHAR projector_ip)
to(dev vdvprojector, dev dvprojector,dev dvtp, char lamp_hour_text_field[4], CHAR projector_ip[15])
I just guessed on the lamp hour length. -
Both amp_hour_text_field and projector_ip are being declared as single byte character variables. You want to make them into an array of appropriate length.
Change(dev vdvprojector, dev dvprojector,dev dvtp, char lamp_hour_text_field, CHAR projector_ip)
to(dev vdvprojector, dev dvprojector,dev dvtp, char lamp_hour_text_field[4], CHAR projector_ip[15])
I just guessed on the lamp hour length.
Thanks I got it!! I actually was define the them as constants and not variables.
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