 |
Code & Applications > DS1005 Remote I/O
DS1005 Remote I/O Application
DS1005 BASIC-programmable Industrial Controller
The DS1005 is a rugged BASIC-programmable industrial controller featuring eight opto-isolated digital sensor inputs, six high-power relays, and one RS232/485 port.
TB1005 Test Board
The TB1005 is supplied with the DS1005. The board is basically a loopback — when one of the relays is activated, voltage is applied to a corresponding sensor input, thus triggering it. There are eight sensor inputs but only six relays. Remaining sensor inputs 7 and 8 are activated by pushing two buttons located on the TB1005.
More on all this in the official TB1005 documentation.
This Application
DS1005 Remote I/O Application allows you to remotely control relays and monitor sensor inputs.
The application provides access to the DS1005 through two independent interfaces: your web browser, and Tibbo's AggreGate device management system. Limited setup functionality is also available through the DS Manager utility.
Initial Setup of The DS1005
- This procedure uses the DS Manager utility, which is a part of our Tibbo Device Server Toolkit. Minimum version is 5.4.3 (we recommend to use the current one published on our site).
- If your DS1005 doesn't have the application preloaded, load it now using Device Explorer.
- After that, initialize application settings by pressing and holding the setup button until you hear a short beep (a long beep would indicate a problem).
- Plug the TB1005 into the DS1005 — you will need this for testing your device.
- Reboot the device.
- The DS1005 will boot with DHCP off. Run the DS Manager utility to look at the basic settings of the device.
Note: from time to time our users encounter firewall issues. You may have to disable your firewall (or allow UDP traffic on port 65535) for the DS Manager to be able to see your DS1005.
- Find your DS1005 in the list, click Settings.
- Enable DHCP or set the desired IP address.
- Click OK.
- The DS1005 will reboot with the new IP/DHCP configuration. You can click Refresh to see what IP address is being actually used by the DS1005.
Accessing the DS1005 through the web browser
- Point your browser to the IP address of the DS1005.
- On the login page click Login — there is no password by default.
- Click Relays (it's in the menu on the left).
- Set desired relay states. Click Save and observe LEDs on the left side of the DS1005 turn on/off thus reflecting the state of sensors. Push buttons on the TB1005 to activate sensor inputs 7 and 8.
- Now switch to the Sensors page to see the state of the sensors.
Working with AggreGate
- Install the latest AggreGate Server and Client on your PC.
- Download the Industrial I/O Demo for Tibbo DS1004/DS1005 controllers. You may have to install Java runtime for this plugin to work. You can find it under the Free Java Download link in Java.com.
- Run LinkServer. Once it loads and you see an icon in the system tray, run AggreGate Client.
- Create a new workspace by entering a username (admin) and password (admin).
- If you are running the Server and the Client on the same PC, the software will now prompt you to create a server connection automatically. Otherwise, create a new Server connection using the default username (admin) and password (admin).
- Now, configure your DS1005 to connect to AggreGate Server:
- Run DS Manager.
- Open settings for your DS1005 and set AggreGate connection to Enabled.
- Set Server IP and Server listening port (IP is your computer's IP, and default port is 6480, just like on the screenshot).
- Set Owner name to "admin" (this is the name you used in AggreGate, right?).
- Set the Device name to something suitable, like "DS1005_1".
- Click OK. The DS1005 will reboot.
Note: from time to time our users encounter firewall issues. You may have to disable your firewall (or allow access to port 6480) for the DS1005 to be able to connect to the Server.
- The DS1005 will connect to the server and you will see new device appear under Devices/All Devices.
- Right-click your DS1005 device and select Edit Device Properties — Device Properties dialog will open.
- Switch to Device Settings Synchronization Options tab.
- Scroll down to Sensor 1 - Sensor 8 lines and set Custom Synchronization Period for each one to 500 Milliseconds.
- Click OK.
- Right-click your DS1005 device and select DS1005 Status Panel.
- Check/uncheck relays and observe how sensor inputs are activated/deactivated. Event log will also be receiving events as you do this.
Notes for Programmers
This application demonstrates how simple it is to create custom code using Tibbo BASIC. The application relies heavily on library files. Only four files (plus several HTML pages) define all functionality:
- Main.tbs contains all event handlers;
- Boot.tbs holds initialization code;
- Device.tbs contains project-specific procedures;
- Loop.tbs contains the "high-level" logic according to which the device works.
The program is a mix of "remote I/O" functionality and an example of how our Tibbo-programmable devices can operate and take decisions independently. To demonstrate the latter this application controls LEDs according to the states of sensor inputs. This is a very simple example of decision-making, but you can easily expand and customize what the application does — just install our TIDE software. Can't figure out how? — ask us. Have a project but don't want to code? — let us code it for you.
This application also shows off our AggreGate system. The Status Panel is just a sample widget — you can create any widget you need for your own project.
|
 |