Home


The Product


The Market


I Want It


Code & Applications


Extras

Code & Applications > DS1004 Remote I/O

DS1004 Remote I/O Application

Release Date:Original (v1.00):
2 February 2010
Project files: (v1.00)Source Code
Compiled Binary
Minimum TIDE version:2.20.20 (Download page)
Minimum TiOS version:2.22.10 (Download page)
Minimum TDST version:5.4.3 (Download page)
Minimum AggreGate version:
(Get Server, Client, and Industrial I/O Demo from download page)
4.33.01 (Download page)
Platform:EM1000
Try it on:DS1004

DS1004 BASIC-programmable Industrial Controller

TB1004 Test Board

DS1004 and TB1004 Test Board

The DS1004 is a rugged BASIC-programmable industrial controller featuring with eight A/D channels, four D/A channels, two low-power relays, and one RS232/485 port.

TB1004 Test Board

The TB1004 is supplied with the DS1004. The board is basically a loopback — it feeds D/A outputs 1-4 into A/D inputs 1-4 of the DS1004. D/A outputs are also connected to red LEDs 1-4 so you can visually see how high the voltage is on each D/A channel as reflected by the brightness of LEDs.
Note: D/A channels output voltages in the -10V to +10V range, but LEDs are unipolar devices so they will only "respond" to positive voltages (0V to +10V).

Remaining A/D channels 4-8 are connected to D/A output 4 through four adjustable resistors R5-8. Therefore, these A/D inputs will see fractions of D/A 4 voltage, proportional to the central tap position of each adjustable resistor.

More on all this in the official TB1004 documentation.

This Application

DS1004 Remote I/O Application allows you to remotely control D/A channels, monitor A/D channels, and set voltage thresholds (separately for each A/D channel) that will cause relays to be triggered and events to be generated.

The application provides access to the DS1004 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 DS1004

  • This procedure uses the DS Manager utility, which is a part of our Tibbo Device Server Toolkit (TDST). Minimum version is 5.4.3 (we recommend to use the current one published on our site).
  • If your DS1004 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 TB1004 into the DS1004 — you will need this for testing your device.
  • Reboot the device.
  • The DS1004 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 DS1004.

DS1004 in DS Manager

  • Find your DS1004 in the list, click Settings.
  • Enable DHCP or set the desired IP address.
  • Click OK.
  • The DS1004 will reboot with the new IP/DHCP configuration. You can click Refresh to see what IP address is being actually used by the DS1004.

Accessing the DS1004 through the web browser

  • Point your browser to the IP address of the DS1004.
  • On the login page click Login — there is no password by default.
  • Click D/A channels (it's in the menu on the left).
  • There are four numbers you can enter on the D/A Channels page. Value range is 0-16383. 0 means -10V, 16383 means +10V, and 8192 means 0V. Set channels, say, to 10239, 12287, 14335, and 16383. Click Save and observe how the four LEDs on the TB1004 light up with different levels of brightness. Remember, LEDs will only light up for positive voltages, so stay within the 8192-16383 range.
  • Now switch to the A/D Channels page and you will see how A/D channels 1-4 reflect D/A output values you've just set. This will not be exact — you are dealing with an analog system — but A/D measurements will closely follow D/A output voltages.
  • A/D channels 4-8 take their input from adjustable resistors, and resistors are powered from the D/A channel 4. If you set D/A 4 output to 16383 then voltages on channels 4-8 will be adjustable in the 0-10V range. Play with resistors and click Reload to see changed measurements on A/D channels 4-8.
  • Turn resistor R5 all the way counter-clockwise so that you apply 0V to A/D 8.
  • Now turn to A/D Channel Alerts page. Whoa — more settings! Let's play with alerts for A/D channel 8 — select it in the dropdown.
  • Enable alerts for this channel, set high threshold to, say, 15000. Set low threshold to 10000. Set Relay control to Relay1, normal. Click Save.
  • Now rotate R5 all the way clockwise. You will hear the relay click. One green LED will be turned off, and the corresponding red LED will be turned on. These LEDs are on the left side of your DS1004. Two green/red LED pairs are used, one for each relay.
  • Rotate R5 all the way counter-clockwise. Relay will be deactivated, red LED will be turned OFF, green will switch back on. Relay states can also be checked on the Relays page.

Working with AggreGate

DS1004 in 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 DS1004 to connect to AggreGate Server:
    • Run DS Manager.
    • Open settings for your DS1004 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 "DS1004_1".
    • Click OK. The DS1004 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 DS1004 to be able to connect to the Server.

DS1004 Demo Status Panel (Widget)

  • The DS1004 will connect to the server and you will see new device appear under Devices/All Devices.
  • Right-click your DS1004 device and select DS1004 Status Panel.
  • Move D/A sliders in the panel. Observe how the LEDs on the TB1004 change brightness. Next, rotate the adjustable resistors on the DS1004 and see how A/D channel bars in the panel reflect varying voltage levels.
    Note: the Status Panel operates with positive D/A voltages. Bottom slider (bar) position corresponds to 0V, and top corresponds to +10V.

  • If you followed our previous suggestions and programmed alerts for A/D channel 8 then you can rotate R5 on the TB1004 and observe how a relay activates/deactivates. You will also see messages being added to the event log within AggreGate Client.

  • To configure alerts and other settings from within AggreGate, right-click your DS1004 device in the list and select Configure Device.

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 six 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;
  • Adc.tbs is a library for working with A/D channels;
  • Dac.tbs is the same for D/A channels;
  • 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 of example how our Tibbo-programmable devices can operate and take decisions independently. To demonstrate the latter this application controls two relays of the DS1004 according to the measurements on A/D channels. 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.

© Tibbo Technology Inc. 2001-2010 | Login | Register
Home | Contact Us | Disclaimer | Blog (news)