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.
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)=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
(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 .
byte(0)=&h62 to the port
byte(1)=&h62 to the port
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.