Skip to main content

AccessTr.neT


com port dan veri alma

com port dan veri alma

Çözüldü #1
merhaba arkadaşlar Access le kendi işlerimi kolaylaştıram farklı programlar yaptım.

bir sorum olucak araç kantarındaki invikatör com1 portuna takılı
kantar programı buradan kiloyu okuyabiliyor.
biz Access programının içinde okutabilirmiyiz.
barcins, 29-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla
Çözüldü #2
olabilir
meşhur çin atasözü  "ACCESS İLE YAPABİLECEKLERİNİZ HAYAL EDEBİLECEKLERİNİZ İLE SINIRLIDIR" siz ne kadar hayal edebiliyorsunuz
Cevapla
Çözüldü #3
Img-grin ben tartı programı yapmak istiyorum.
barcins, 29-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla
Çözüldü #4
bunun için mscomm.dll diye bir kiatplık var onu yüklemen lazım
sana örnek bir port okuma yazma kodu


porta bilgi gönderme


Private Sub Command1_Click()
With MSComm1
'make sure the serial port is open
If .PortOpen = False Then .PortOpen = True
'send the data (including a tailing carriage return as often needed)
.Output = Text2.Text & vbCr
End With 'MSComm1
With Text2
'place the focus back to the textbox
.SetFocus
'select the current text to be overwritten
.SelStart = 0
.SelLength = Len(.Text)
End With 'Text1
End Sub

portu açma

Private Sub Form_Load()
With MSComm1
'make sure the serial port is not open (by this program)
If .PortOpen Then .PortOpen = False
'set the active serial port
.CommPort = 2
'set the badurate,parity,databits,stopbits for the connection
.Settings = "9600,N,8,1"
'set the DRT and RTS flags
.DTREnable = True
.RTSEnable = True
'enable the oncomm event for every reveived character
.RThreshold = 1
'disable the oncomm event for send characters
.SThreshold = 0
'open the serial port
.PortOpen = True
End With 'MSComm1

End Sub

porttan gelen bilgiyi okuma


Private Sub MSComm1_OnComm()
Dim strInput As String
With MSComm1
'test for incoming event
Select Case .CommEvent
Case comEvReceive
'display incoming event data to displaying textbox
strInput = .Input
Text1.SelText = strInput
End Select
End With 'MSComm1
End Sub
meşhur çin atasözü  "ACCESS İLE YAPABİLECEKLERİNİZ HAYAL EDEBİLECEKLERİNİZ İLE SINIRLIDIR" siz ne kadar hayal edebiliyorsunuz
Cevapla
Çözüldü #5
çok teşeekkür ederim denicem. son olarak
bilgiyi bir keremi okuyor sürekli yeniliyormu değişiklikler için.
birde porta bilgi gönderme, port açma, port okuma, üçünü bir kullanmıcam herhalde.
kusura bakmayın kod yazma harici Access de çok şey yapıyorumda kod işi beni aşıyor.
barcins, 29-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla
Çözüldü #6
çok aradım fakat mscomm.dll yi bulamıyorum Img-cray
tamamam samsung telefon cd sinde buldum dll. yi
2 satırda hata verdi.

Rem porttan gelen bilgiyi okuma

Private Sub Komut0_Click()
Dim strInput As String
With MSComm1
'test for incoming event
Select Case .CommEvent
Case comEvReceive
'display incoming event data to displaying textbox
strInput = .Input
Metin1.SelText = strInput
End Select
End With 'MSComm1

End Sub




Rem portu açma
Private Sub Komut4_Click()
With MSComm1
'make sure the serial port is not open (by this program)
If .PortOpen Then .PortOpen = False
'set the active serial port
.CommPort = 2
'set the badurate,parity,databits,stopbits for the connection
.Settings = "9600,N,8,1"
'set the DRT and RTS flags
.DTREnable = True
.RTSEnable = True
'enable the oncomm event for every reveived character
.RThreshold = 1
'disable the oncomm event for send characters
.SThreshold = 0
'open the serial port
.PortOpen = True
End With 'MSComm1

End Sub


nasıl halledebilirim.
ufak programda yaptım şimdilik yardımlarınız için teşekkür ederim.
barcins, 29-05-2009 tarihinden beri AccessTr.neT üyesidir.
Son Düzenleme: 30/05/2009, 14:32, Düzenleyen: barcins.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da