MSR DATA EVENT is not execute
-
2010年4月13日 14:52
hi
I am able to open and claim the device . but i am not able to read on my MSR
i suppose the dataevent is not execute . why i don't ?
need help
thanks
Ram
すべての返信
-
2010年4月13日 15:44回答者:
Did you enable Dataevents? Can you post the code?
-Sean
www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step -
2010年4月17日 4:01
yes i enabled data event and if see the procedure sub New is executed successfully without any error .
Imports Microsoft.PointOfService
Imports System.Text
Public Class Form1
WithEvents myExplorer As PosExplorer
WithEvents myMSR As Msr
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call.
myExplorer = New PosExplorer(Me)
Dim Device As DeviceInfo = myExplorer.GetDevice("Msr", "MyMsr2")
Dim eFlag As Integer = 0
If Device Is Nothing Then
lblStatus.Text = "No MSR found"
Update()
Else
Try
myMSR = myExplorer.CreateInstance(Device)
myMSR.Open()
myMSR.Claim(10000)
myMSR.DeviceEnabled = True
myMSR.DataEventEnabled = True
myMSR.DecodeData = True
myMSR.CheckHealth(HealthCheckLevel.Interactive)
myMSR.ClearInput()
Catch ex As Exception
myMSR.Close()
End Try
End If
End Sub
Private Sub myExplorer_DeviceAddedEvent(ByVal sender As Object, ByVal e As Microsoft.PointOfService.DeviceChangedEventArgs) Handles myExplorer.DeviceAddedEvent
If (e.Device.Type = "Msr") Then
myMSR = myExplorer.CreateInstance(e.Device)
lblStatus.Text = "New Msr attached: " & e.Device.ServiceObjectName
myMSR.Open()
myMSR.Claim(1000)
myMSR.DeviceEnabled = True
myMSR.DataEventEnabled = True
myMSR.DecodeData = True
Update()
End If
End Sub
Private Sub myMSR_DataEvent(ByVal sender As Object, ByVal e As Microsoft.PointOfService.DataEventArgs) Handles myMSR.DataEvent
Dim myEncoding As New ASCIIEncoding
txtInput.Text = myEncoding.GetString(myMSR.Track2Data)
lblStatus.Text = "Data Event"
Update()
myMSR.DataEventEnabled = True
End Sub
End Class
-
2010年4月17日 15:24回答者:
What make and model of MSR? Is it setup for USB HID rather than keyboard wedge interface?
Does the MSR work with the sample test application that comes with the SDK?
-Sean
www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step -
2010年4月21日 4:53
Dear Sean
details of MSR i am using is as follow
Make : TYSSO
Model : MSE-750
Yes it works with the sample exe provided along with this device
I am connecting this device via USB HID
Regards
Rambarat
-
2010年4月21日 5:38回答者:
I am not seeing anything wrong with the code.
You could try to remove the following lines:
myMSR.CheckHealth(HealthCheckLevel.Interactive)
myMSR.ClearInput()1. Now I have to ask what OS type are you running - is it 32-bit or 64-bit?
2. You ran the device's sample application, but what about the POS for .NET SDK sample application? Does the MSR work with this application?
-Sean
www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step- 回答としてマーク Terry WarwickMicrosoft Employee, Owner 2010年8月30日 20:07
-
2010年4月21日 9:29
OS type is windowXP 32 bit with service pack 3
I had tried POS for .Net SDK .
same issue the data_event is not raise.
-
2011年10月25日 4:21
Hi,
Did you slove data_event is not raising problem the same proble i'm facing. if you did this problem then would you like to share with me.
Ajun

