ICP DOS Model: I-7018 TEST PROGRAM IN VB6

DESIGN VB-6 PROGRAM FOR DCON 8 CHANNEL TC MODULE I-7018

Click to access VB6-PRG-7018.pdf

Preparation
************
01. Install VB6 on your PC
02. Install DCON Drivers —> Run DCON I-756x_1223_ DriverInstaller
03. Install DCON_ActiveX —> Run DCON_ActiveX Setup
04. RUN VB6 on your PC
05. Open Standard EXE
06. Click on Project Menu then Click on Components..(Ctrl+T)
07. Tik mark on DCON_X ActiveX Control
08. Click OK now you will get DCONOCX ICON on left hand General tools
09. Click on DCONOCX ICON
10. Now go on form then press left botto mouse and drag
11. you will see DCONOCX ICON on your form
*******************************************************
12. Now Draw following Lavel and ComboBox and name it as following
D R A W O N F O R M

Label Name : Component : Component Name –> Go to Properties
a. COM Port : Text1.text : eCOMPort
—————————————————————————————-
b. Baud Rate : Combo1Box : cbBaudRate : ItemData List
115200, 57600, 38400, 19200, 9600, 4800,
2400, 1200,
—————————————————————————————-
c. Check Sum : Combo2Box : cbCheckSum : ItemData False, True
—————————————————————————————-
d. Module Address[Hex] : Text2.text : eModuleAddress : Text 0
—————————————————————————————-
e. Module ID[Hex] : Combo3Box : cbModuleID7017 : ItemData 7017, 7018, 8017, 87017
—————————————————————————————-
f. 8000Slot : Combo3Box : SlotCombo1 : ItemData 1, 2, 3, 4, 5, 6, 7
—————————————————————————————-
13. Now Draw following Lavel and name it as following
Label7 arry Label7(0) Label7(1), Label7(2), Label7(3), Label7(4), Label7(5), Label7(6), Label7(7)
Type as CH0:, CH1:, CH2:, CH3:, CH4:, CH5:, CH6:, CH7:

14. Label8 arry Label8(0) Label8(1), Label8(2), Label8(3), Label8(4), Label8(5), Label8(6), Label8(7)
Type as blank for Reading TC value CH0:, CH1:, CH2:, CH3:, CH4:, CH5:, CH6:, CH7:

15. Command1 Name it as cmdRead and type following

Private Sub cmdRead_Click()

Dim InValue(0 To 7) As Single
Dim i As Integer

DCON_X1.BaudRate = Val(cbBaudRate.Text) ‘ setting the baudrate
If cbCheckSum.ListIndex = 0 Then
DCON_X1.CheckSum = False ‘ checksum disable
Else
DCON_X1.CheckSum = True ‘ checksum enable
End If
DCON_X1.COMPort = eCOMPort.Text
DCON_X1.ModuleID = CLng(“&H” + cbModuleID.Text)
DCON_X1.ModuleAddress = Val(“&H” + eModuleAddress.Text)
DCON_X1.SlotNo = SlotCombo1.Text
DCON_X1.Mode = 0
DCON_X1.PortOpen = True ‘ Open the ComPort
If DCON_X1.ErrorCode 0 Then
Exit Sub
End If
DCON_X1.AnalogIn8 InValue(0) ‘ reading the analog input value
For i = 0 To 7
Label7(i).Caption = Format(InValue(i), “0.00”)
Next i
End Sub

16. Rest design as given in following picture
http://www.areptone.in/aep/dcon.jpg
http://www.areptone.in/vb6/aepdcon.rar

17. Save and Run
(By Mr. Adeeb Raza)

About adeebraza1236

I am an electronic instrumentation engineer by profession but I am working as a design engineer. I can design electronic hardware interface circuits for computer based security system, Computer based industrial control system for automation and process control Etc. My Interests: Electronics Circuit designing with PCB Designing, Computer software development using VB & C , PC based security system, Designing LED Lights, UPS, Inverter Etc
This entry was posted in Adeeb Raza, Areptone, ICP CON, ICP-DOS, Uncategorized, Visual Basic 6 Code and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s