User`s manual

SDK 2 Programmer’s Guide Developing User Applications
3-3
Development System
Before getting started on application development, you need to make sure that all of the required
equipment is set up and ready to go. Take NPort 5200-P as an example. The basic configuration
needed for application development is as follows:
¾ Windows 95/98/Me/NT/2000/XP computer with SDK installed
¾ NPort 5200-P with power adapter
¾ Ethernet hub/switch (or use a cross-over Ethernet cable to link the computer and NPort
directly)
¾ Two Ethernet cables
The basic wiring needed to set up a development system is as shown below.
Ethernet
Hub/Switch
5210
5210-P
10/100M
Ethernet
Port 2
RS-232
Port 1
RS-232
Ready
Link
P1
P2
Industrial RS-232 Device Server
RESET
V+
V-
12-30V
Ethernet
NPort 5200-P
Windows
Computer
Ethernet
Source Code Editing
Since the Turbo C compiler and linker work under the traditional DOS environment or windows
command prompt, we recommend using \TC\TC.EXE to edit your source code, or simply type
“edit” on the command line and then hit Enter to start Windows’ built-in editor.
You may also use “notepad” or any other text editor to write and edit source code. Turbo C’s IDE
environment is another good option. However, the environment variables need to be manually
configured since NPort SDK works mainly from command line mode.
For example, to edit the file SDKser23.c, first open a Command Prompt, use the cd (change
directory) command to open the folder C:\PCGSDK2\Example\Serial , and then type edit
SDKser23.c. You should now be able to view and edit the file SDKser23.c.