vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Blitzschnelles Erstellen von grafischen Diagrammen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: IR-Lischtschranke LPT-Port 
Autor: Peacemaker
Datum: 19.05.07 21:10

Hi,

danke, für deine Antwort. Habe es ausprobiert bekomme aber im folgenden Abschnitt eine Fehlermeldung:

Public Function Lese_InputByte() As Byte
  ' Diese Funktion liefert ein am InputPort gelesenes Byte zurück
  ' Die Bits 0,1,2 sind unbenutzt und werden immer als 1 = gesetzt zurückgegeben
  Dim Ausgabe As Integer
  Dim Port As Integer
 
  Port = CInt(Basisadresse) + 1
  Ausgabe = Inp(Port) '<--Fehler
  ' Bit7 muß invertiert werden & die 3 LSB auf 1 setzen
  If Ausgabe >= 128 Then Ausgabe = Ausgabe - 128 Else Ausgabe = Ausgabe + 128
  Ausgabe = Ausgabe Or 7
  Lese_InputByte = CByte(Ausgabe)
End Function
Fehlermeldung:

System.Runtime.InteropServices.SEHException wurde nicht behandelt.
ErrorCode=-2147467259
Message="Eine externe Komponente hat eine Ausnahme ausgelöst."
Source="Rundenzeitmessung"
StackTrace:
bei WindowsApplication1.modLPT.Inp(Int32 PortAdress)
bei WindowsApplication1.modLPT.Lese_InputByte()
bei WindowsApplication1.modLPT.Lese_InputString()
bei WindowsApplication1.modLPT.Lese_InputBit(LPT_Input_Pin Pin)
bei WindowsApplication1.frmRennen.Button1_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.Run(ApplicationContext context)
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bei WindowsApplication1.My.MyApplication.Main(String[] Args)
bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()

Hab mal die gesamte Fehlermeldung kopiert, bei Port steht: 889. Ich hoffe du kannst damit was Anfangen.


mfg
peacemaker

e-mail: vbarchiv@web.de

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
IR-Lischtschranke LPT-Port843Peacemaker18.05.07 20:45
Re: IR-Lischtschranke LPT-Port599GPM19.05.07 12:13
Re: IR-Lischtschranke LPT-Port657Peacemaker19.05.07 21:10
Re: IR-Lischtschranke LPT-Port551GPM20.05.07 00:17
Re: IR-Lischtschranke LPT-Port574Peacemaker20.05.07 01:35

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel