About Comm Port

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

About Comm Port

 
0
  #1
Jun 22nd, 2007
hi , my problem with comm port in device manager,when i using serial rs232 to send data to port first time when i switch on the pc
it execute the program ,But when i use USB to Serial Adapter cable to send data it work's fine but again i want to use RS232 to send data ,then it 's say the invalid port number in my program .i am using Com1 for both in device manager.I tryed with com2 for Rs232 it say's invalid port number i aslo changed in the commport =2 in my code.
i am using Mscomm1 in vb6 ,
When i plug usb to serial it keep the com1 with it.not allowing to other to use it . I removed usb to serial plug and tryed using com1 for rs232 it won't work it say 's invalid port num ,When i start pc first time it will work for Rs232 without USb to Serial whenipluged usb cable it will wont allow to rs232 to use comm 1.
About ARRAy
also have problem with array if i inistalize Dynamic array() then use
redim array to allocate some array to it like (0 to 4 ) to send the byte to port is this array will stop exeuting in loop when it send 4 byte to port in continously .Thus we can add many elements to 0th element of the array like
(0)=1
(0)=2
(0)=3thus it will store diffferent value in the 0 element of the array or we hv to allocate different element for each different data to store like (0)=1
(1)=2
(2)=3 this way .In my code i using 4 function calling each of the function in one another to continously to display value from port in progressbar . Like 2 call in 1 ,3 call in 2,4 call in 3 ,1 call in 4 like a loop .
All the 4 func are in the loop ,befor "loop until condition" this stament of the loop ,i have called the another function to execute .
function1()
do
byte(0)=&h62 to the port
byte(1)=&h62 to the port
call function2()
loop until condition func 2 willl call 3..
My Problem is i assigned 100 of array for each function. it was excuting properly but after some time it stop looping the code that 100 of array was over then i assign 150 of array it again executing properly .If i use Redim statement then i have not to assign many array for it which it stop looping.
I want to clear some doubt
1.how the array values r stored in the array
2.how the Redim is used
3.when we execute some program in vb thus it again assign the array from the starting value thatis 0 to 100 (in program)or it start from remaining of the array which has to be allocate in the memory.
4.Can we refresh the array which is alerady asign to the some variables that again we have not to asign it.
If Any confusion then pls ask .thank u.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 166
Reputation: AV Manoharan is an unknown quantity at this point 
Solved Threads: 9
AV Manoharan AV Manoharan is offline Offline
Junior Poster

Re: About Comm Port

 
0
  #2
Jun 28th, 2007
Jatinder,
Whenever I open your thread to answer I feel jittery. Do you know why?. It is because of the way you have presented your problem. I can understand your urgency. But you should restrain from adding one after another your problems in one thread itself. It is very difficult to assimilate.

Now you and your Com Port trouble.

You are using USB as well as Serial. OK. In your Program you make changes to send and receive data through these devices, right?. And you as the user replace tha cable accordigly? ha! or your program select a port and use the device attached? or it select a device, come, what may be the port. What is true in this?

Think... Think much more.. you will definitely get the answer.

About the array, it seems you have earlier started a thread. I am unable to make out anything of it. Please explain it line by line what you want actually to establish.
Last edited by AV Manoharan; Jun 28th, 2007 at 5:59 am.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: About Comm Port

 
0
  #3
Jun 29th, 2007
sorry manoharan,i could not presented my Que's properly .
thank u for showing my mistake.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC