Internet PLC Forum
General => Technical support => Topic started by: dppcw on April 25, 2005, 11:51:06 AM
-
I have a program to get data from a plc with VB. I need to type a command and send it to the plc. Where do I find support for these commands
Thanks
-
For M-series PLC, please check the T100MD+ User's Manual (light blue cover). For H-series, it is in the H-series User's Manual (light green cover). For E10-npn+ there is a link at our website to download the host link command page.
If it is not our PLC, please do not pose the questions here. Thank you.
-
I have an M series. I get a "no response from PLC" message. Does this mean that i am entering the wrong command??
Thanks
-
Are you using the VB example programs downloaded from our website? If not, please download it from:
http://www.tri-plc.com/applications/VBsample.htm
The most fundamental command that all the PLC will response is:
IR*
Please try to enter the above command (note they are capital letters (i.e. "IR", not "ir") at the "Command Prompt" string and you shoudl receive a response string telling you the ID of the PLC. E.g. a PLC with ID of 01 will return "IR01*".
If you don't even receive a response from IR, then most likely your com port choice is wrong or other hardware related issues.
-
Could I so the same thing over the network? The plc is connected to the network and I can communicate with excel link. Could I retrieve data from it from a remote computer? If so. how? Thanks
-
If you write program in Java, then you can obtain a plcmon.jar API from us that allow you to access a remotely located TLServer via the LAN or the Internet. You need the API in order to login to TLServer using some proprietary encryption method. However, at the moment we don't have any API library for Visual Basic to enable the same functionality.
-
Would I use the same commands to access data over the network. How does excel link retrieve data? Would I use a udp connection?
Thanks
-
To use ExcelLink, A PC must be running the TLServer program and connected to the PLC. However, ExcelLink software can be running on a different PC but linked to the same network. ExcelLink incorporates our PLCmon.jar API library which enable it to talk to a remote TLServer on the network and the TLServer in turn relays the messages to the PLC via RS232 port.
In other words, TLServer acts as a TCP/IP gateway for the PLC. If you wish to permanently connect the PLC to the network without having a PC running TLServer 24/7, then you can purchase the optional Ethernet XServer which take the place of the PC + TLServer.
-
how do i send a "start" command with VB? Do i write inputs? if so do i write WI00... what goes into the data portion???
Thanks
-
You can write to the PLC inputs using "WInnxx" but it will only affect the PLC input logic state for one scan time, at the end of the ladder logic scan the input logic state will be updated with the actual physical input state. But often that 1 scan time of input changes is sufficient to force start a process. A better method may be to change an internal relay and use the internal relay contact to trigger a process. That can be accomplished by "WRnnxx" command. "xx" is the 8-bit data for the whole 8 bit channel.
However, note that both WI and WR affects 8 bits at a time. So normally you will have to read the current state of the channel and then just alter one bit (use the SETBIT or CLRBIT command) and write the channel data back to the input or relay channel. This ensure that you don't affect other inputs.
Another possibility is to use the "Wbnnnnxx" command to change only a single bit if your firmware revision is at least r47 or above. (Use the "Get PLC Hardware Info" command in TRiLOGI to check the firmware revision). This is a better and faster method to turn on/off a single bit on the PLC..