Click here to Skip to main content
15,921,174 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Searching Inside the .zip Pin
jzonthemtn30-Sep-08 1:39
jzonthemtn30-Sep-08 1:39 
QuestionHide the enable parameter field prompt in crystal report Pin
member2729-Sep-08 20:53
member2729-Sep-08 20:53 
QuestionExcel cell reference in other sheet vb.net Pin
~Khatri Mitesh~29-Sep-08 20:25
~Khatri Mitesh~29-Sep-08 20:25 
Questionweb service issue Pin
Tauseef A29-Sep-08 18:27
Tauseef A29-Sep-08 18:27 
AnswerRe: web service issue Pin
jzonthemtn30-Sep-08 1:33
jzonthemtn30-Sep-08 1:33 
AnswerRe: web service issue Pin
Rajesh Anuhya30-Sep-08 1:36
professionalRajesh Anuhya30-Sep-08 1:36 
AnswerRe: web service issue Pin
Dave Kreskowiak30-Sep-08 1:44
mveDave Kreskowiak30-Sep-08 1:44 
QuestionUSB Com emulator Port Misbehaves Pin
rfrank535629-Sep-08 14:22
rfrank535629-Sep-08 14:22 
Hi - I have a VB.Net app that controls several devices - including a servo on a USB/Com port using a VCP - I am adding another device with another USB/Comport VCP driver and my vb.et program will not send the write buffer contents to the port, but does not throw an error but hangs on the next read.

I have tested the interface and device (a USBI/O24R board) using hyperterminal and the device and ports work fine.

Lots of time searching for a similar problem - no joy - so here are a few questions.

Is there a limit on how many USB/Serial (virtual COm Port) emulators in a system. Is there a problem with high com munbers (I started at 17) - but I should point out that I move the USB/Serial port to com2 with the same results.

Is there a problem with the USBI/O24R driver ? I have had a few emails with the chip supplier but no help yet except try getting to a lower com port - no results.

Below is an extract of my test code . . .

I added the GetSerialPortNames to see what was happening - POrtmon shows tthe name of the port and the open/close and a single write of "0A" but none of the data string. No change when the VCP was forced to Com2

Thanks for the help

Bob

__________________________________________

Public SwitchCommName As String = "COM2"
Public SwitchCommSpeed As Integer = 9600
Public SwitchCommParity As System.IO.Ports.Parity = IO.Ports.Parity.None
Public SwitchCommDataBits As Integer = 8
Public SwitchCommStopBits As System.IO.Ports.StopBits = IO.Ports.StopBits.One

Public SwitchComDataOut As String
Public SwitchCommFlowControl As System.IO.Ports.Handshake = IO.Ports.Handshake.None
Dim SwitchCom As SerialPort = My.Computer.Ports.OpenSerialPort(SwitchCommName, SwitchCommSpeed, IO.Ports.Parity.None, SwitchCommDataBits, IO.Ports.StopBits.One)
Public SwitchCommdataOut As String
Public SwitchCommDataIn As String
Public Switch_WordOK As Boolean = False

Sub InitializeRemoteSwitch()
Call GetSerialPortNames()
MsgBox("OK")

SwitchCom.DiscardInBuffer()

'ID device First
SwitchCommdataOut = "?TTTTTTT" '& vbCrLf
SwitchCom.WriteLine(SwitchComDataOut)
Try
SwitchCommDataIn = SwitchCom.ReadLine()
MsgBox(SwitchCommDataIn)

Catch ex As Exception

End Try


'Set I/02 as Input (switch), I/04 as output (Red) and I/06 as Output (Green)
'Default is input
'Values = 2 , 8 and 32 so output total is 40
Dim SwitchCommOutputSelect As Integer = 40
Dim SwitchCommBothLightsOn As Integer = 40
Dim SwitchCommGreenLightOn As Integer = 32
Dim SwitchCommRedLightOn As Integer = 8
Dim IOValA As String = System.Convert.ToChar(SwitchCommOutputSelect)
SwitchCommdataOut = "!A" & IOValA
SwitchCom.WriteLine(SwitchComDataOut)

'Set both lights on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Both Lights")

'Set red light on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Red Light")

'Set Green light on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Green Light")
Dim I As Integer

For I = 1 To 10
'Get Switch Data
SwitchCommdataOut = "a"
SwitchCom.WriteLine(SwitchComDataOut)
Try
SwitchCommDataIn = SwitchCom.ReadLine()
MsgBox(SwitchCommDataIn)

Catch ex As Exception

End Try

Next
End Sub
Sub GetSerialPortNames()
' Show all available COM ports.
For Each sp As String In My.Computer.Ports.SerialPortNames
ListBox1.Items.Add(sp)
Next
End Sub







QuestionRaw Joystick data in vb.net Pin
bfeike29-Sep-08 13:26
bfeike29-Sep-08 13:26 
AnswerRe: Raw Joystick data in vb.net Pin
bfeike6-Oct-08 20:21
bfeike6-Oct-08 20:21 
QuestionIs it really possible: No access to bitmap in VB? Pin
Sonhospa29-Sep-08 11:42
Sonhospa29-Sep-08 11:42 
AnswerRe: Is it really possible: No access to bitmap in VB? [modified] Pin
Dave Kreskowiak29-Sep-08 11:58
mveDave Kreskowiak29-Sep-08 11:58 
GeneralRe: Is it really possible: No access to bitmap in VB? Pin
Sonhospa29-Sep-08 12:20
Sonhospa29-Sep-08 12:20 
GeneralRe: Is it really possible: No access to bitmap in VB? Pin
Dave Kreskowiak29-Sep-08 14:13
mveDave Kreskowiak29-Sep-08 14:13 
Questionxds Pin
postonoh29-Sep-08 11:35
postonoh29-Sep-08 11:35 
AnswerRe: xds Pin
Dave Kreskowiak29-Sep-08 11:55
mveDave Kreskowiak29-Sep-08 11:55 
QuestionAdding a string to an existing byte array Pin
Scott Barbour29-Sep-08 11:05
Scott Barbour29-Sep-08 11:05 
AnswerRe: Adding a string to an existing byte array Pin
Dave Kreskowiak29-Sep-08 11:53
mveDave Kreskowiak29-Sep-08 11:53 
AnswerRe: Adding a string to an existing byte array Pin
Guffa30-Sep-08 3:17
Guffa30-Sep-08 3:17 
GeneralRe: Adding a string to an existing byte array Pin
Scott Barbour30-Sep-08 4:39
Scott Barbour30-Sep-08 4:39 
QuestionSlow execution in VB6 whil very fast from SQL Server Query Analyzer Pin
Fadou29-Sep-08 2:00
Fadou29-Sep-08 2:00 
AnswerRe: Slow execution in VB6 whil very fast from SQL Server Query Analyzer Pin
akimba29-Sep-08 2:54
akimba29-Sep-08 2:54 
GeneralRe: Slow execution in VB6 whil very fast from SQL Server Query Analyzer Pin
Jon_Boy29-Sep-08 3:58
Jon_Boy29-Sep-08 3:58 
QuestionMerge modules for crystal reports, VS 2005 Pin
Michelange MUBERUKA28-Sep-08 23:41
Michelange MUBERUKA28-Sep-08 23:41 
AnswerRe: Merge modules for crystal reports, VS 2005 Pin
Dave Kreskowiak29-Sep-08 1:45
mveDave Kreskowiak29-Sep-08 1:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.