Control an NI-4000 from a PC
[Deleted User]
Posts: 0
Hi all,
I am new to this forum and to AMX. I would like to use an NI-4000 device controller in a project and would like to know whether I can control the NI-4000 from a computer (rather than the other way around). The idea is to have an Apache Tomcat webserver hosting a jsp website that controls both the NI-4000 and applications running in the computer. The use of java would be an advantage as I could reuse a lot of code and would make things much easier. Is this possible? What do I need to use? Are there any requirements? Many thanks in advance
I am new to this forum and to AMX. I would like to use an NI-4000 device controller in a project and would like to know whether I can control the NI-4000 from a computer (rather than the other way around). The idea is to have an Apache Tomcat webserver hosting a jsp website that controls both the NI-4000 and applications running in the computer. The use of java would be an advantage as I could reuse a lot of code and would make things much easier. Is this possible? What do I need to use? Are there any requirements? Many thanks in advance
0
Comments
You can, however, create a comand-line interface via a virtual device. Your computer will have to connect via telnet, but if you are writing Java, you could most likely easily create a front end for that with a GUI. You can then connect to the master, and send and recieve commands to and from the virtual, which can hook into as much of the rest of the program as suits you. I do this all the time for troubleshooting and remote management, sans the GUI - a telnet terminal is sufficient for me; it wouldn't do for all but the most tech-savvy of customers, though.
Don't want to try and state the obvious, but wouldn't the easy solution be to open a server port on a specified port and get your PC to attach via a client connection. Then use a data event in the NI to catch command string and translate the strings into commands within the NI??
It just means that someone has to have the ability to open a client port in Java/VB/C++ and send string to the port???
I have done this for a project where the client wrote thier own interface in Perl and I wrote the Netlinx end on their behalf.
Obviously you can always tell when a client is online through the online event of the server port. If you need more connections just open up multiple server connection on seperate local ports.
Hope this helps
Duncan
Hello,
Yes it is possible, this is what you need:
If you install i!-PCLink Web it will install a Windows ActiveX object called i!-PCLinkXtra.
Default location:
c:\Program Files\Common Files\AMXShare\COM\i!-PCLinkXtra.ocx
This ActiveX object allows native connectivity to Netlinx, and supports three connection models:
1. Client - TCP/IP (connects to specified IP address)
2. Server - Listen (requires URL table entry, Netlinx processor connects to you)
3. Auto - Connects to first Netlinx multicast heartbeat on subnet
Once connected it will show up in Netlinx device tree as a device.
So this can be implemented in your favorite Windows development environment.
If you want a Java wrapper search the web. Here's one: http://java.sys-con.com/read/48177.htm
Joel Winarske
www.indyelectronics.com
Programming AMX since 93'
I'm still waiting on my practical test results, growing a beard here guys....
I am trying to program Netlinx as a Server so it will listen on a given port. I am at a point where I can telnet to the port I'm listening on however the Netlinx program drops the connection automatically after some time. Once the connection is dropped I cannot telnet to the same port again until the unit is rebooted. This issue also occurs when I manually disconnect the telnet session. It won't allow me to reconnect.
Has anyone seen this issue before? Please see attached zip file...
Any help would be appreciated as I am pulling my hair out on this issue...
Thanks in advance,
RMR
Jeff