[WindSRV Quick Reference Guide]
In WindSRV:
1. Define a Channel
A channel is the hardware connection between WindSRV and a
device.
With WindSRV the channel connection can be the following:
- RS232
- Modem
- Ethernet
2. Define a Device
The device in this example will be the IDEC
- MicroSmart
3. Define a Tag Name and PLC Point Address
In this example the Tag Name and the Address will be the
same.
- I0
4. In WindSRV when you're done, you should have the following
information defined:
Channel: RS232
Device: MicroSmart
Address: I0
5. If you're using MicroSoft Excel to display the data, start
Excel and enter
the following in any cell to view I0:
=kepdde|_ddedata!RS232.MicroSmart.I0
The format is: Program name | Topic name ! Channel . Device
. Point Address
Remember, in Excel you can use copy/paste or the auto-fill
feature so you
do not have to re-type the entire string over again for
other addresses.
6. To create a "Toggle Button" in Excel to toggle a MicroSmart
output
Select
- View
- Toolbars
- Control ToolBox
Click-on "Design Mode" and then "Toggle Button"
Draw your "Toggle Button" anywhere on the screen and then
- Right Mouse click
- Select Properties
- Caption, enter a label for your button, say Q0 for
the first output
- Linked Cell, enter a cell number which will change
from 0 to 1 when the button is clicked
In WindSRV make sure Q0 is defined as a Read/Write
address
Enter the following code in the VBA editor by selecting
"View Code" in the Control ToolBox:
Private Sub ToggleButton1_Click()
channel = Application.DDEInitiate("kepdde",
"RS232_MicroSmart")
Set Value =
Application.Worksheets("Sheet1").Range("H11")
Application.DDEPoke channel, "Q0", Value
End Sub
Explanation: H11 in this example is the Linked Cell that
will toggle between
0 and 1 every time you click the toggle button Q0.
That value, 0 or 1 is then transferred to tag name point
address "Q0" in WindSRV.
7. To create a "Scroll Bar" control to send analog data from
Excel to WindSRV
Select
- View
- Toolbars
- Control ToolBox
Click-on "Design Mode" and then "Scroll Bar"
Draw your "Scroll Bar" anywhere on the screen and then
- Right Mouse click
- Select Properties
- Linked Cell, enter a cell number which will change
from "Min" to "Max"as defined in the "Properties" dialog
box.
Enter the following code in the VBA editor by selecting
"View Code" in the Control ToolBox:
Private Sub ScrollBar1_Change()
Channel = Application.DDEInitiate("kepdde",
"RS232_MicroSmart")
Set Set_Point =
Application.Worksheets("Sheet1").Range("C26")
Application.DDEPoke Channel, "SetPt", Set_Point
End Sub
Explanation: C26 in this example is the Linked Cell that
will contain a value between Min and MAX every time you move the scroll button.
The Min/Max value, say 0 to 100 is then transferred to tag
name point address "SetPt" in WindSRV.