10-07-2015 05:45 AM
1) Again i am confuse . my aplliction is read which comport is connected and config that comport and do communictaion .
AS per your code its detecting all comport right . In my appliction connecting only one comport and never use more 2 comport at a time .
if i am using only one comport then no need to " viFindNext".
eg. if my comport is bleow port no 9. if use viFindNext its shows port no 10 only .
and if my comport no is ablove 9 . 1st time its read com port no 10 and then its read actual connected port no.
2) can you give soltuion for my appliction:
I am using labwinodw v 13 .
(USING ONLY ONE COMPORT AT A TIME )
In my appliction just find which comport is conected and config that one ( In my appliction the comport no is variey w.r.t my test baord , it may 3 to 50 ) and send some command uisng that comport .
10-07-2015 05:52 AM
And some questions to answer:
please see bleow ans:
- Are you using VISA to communicate also or only to detect the ports in the system?
>>> yes i am using VISA to communicate .
- Which function is returning that -1 error?
>> if its detect more than 10 port VISA showing rs232 error -5;
- Did you make a try with msaxon code?
>> Not yet . , is this only add taht code or need to copy dll file somewhere in my pc .
- Which ports are returned on the first pne and which one on the second? Do they actually exist in your system?
>> no in sytem exist only one comport . if the comport below com10 VISA detecting correct comport as it in Device manager , if comport no is more than com9 visa always detecting comport no 10 .
10-07-2015 05:55 AM
Not knowing the hardware is difficult for me to understand the situation. Let me comment some sentence.
In my appliction connecting only one comport and never use more 2 comport at a time. if i am using only one comport then no need to " viFindNext".
This is not true: the key point isn't how many ports are you using, but how many ports are in the system. You cannot ignore you have a port 10: whether is a parallel port or a fake port or something else, it actually is in the system and will be returned by searches!
Question: are we speaking about hardware ports in the system or USB-to-serial converters that can assume different port numbers every time they are connected? If the second: are they connected after or before the application is started?
And you have not answered to my previous questions which I list here again:
Question: Are you using VISA to communicate also or only to detect the ports in the system?
Question: Which function is returning that -1 error?
Question: Did you make a try with msaxon code?
10-07-2015 06:01 AM
hi
Question:
are we speaking about hardware ports in the system or USB-to-serial converters that can assume different port numbers every time they are connected?
yes using vertual comport .. serial to usb convertor
If the second: are they connected after or before the application is started?
connecting befor appliction starts
10-07-2015 06:36 AM - edited 10-07-2015 06:37 AM
Which version of VISA have you installed? Did you looked at Wolfgang note regarding the error in VISA <15?
Upgrading the system may solve your problems. The latest version of VISA can be downloaded from here
10-07-2015 07:09 AM
Actually it is not required to install a new VISA version, all the problems can be solved by two mouse clicks... it would, however, require reading the post I have linked before - actually it is just the screenshot provided by JB
Given that the software always runs on the same computer with one internal serial and LPT port and one additional, external serial port one can use MAX to disable the two static motherboard ports by removing the check mark of the respective port, then VISA will not find ASRL10 and ASRL20 any more... and viFindRsrc will only find the external port (provided that the search string is corrected)
In my opinion not the best solution (not portable), but definitely the fastest.
10-07-2015 07:27 AM
HI
But my issue is not only 10 and 20 port. IN VISA more than 9 port is not deteting (finding )[status = viFindRsrc (defaultRM, "ASRL[0-9]*::?*INSTR", &find_list, &retCnt, instrDesc); Above 9 port number visa showing only like "ASRL10::INSTR"
10-07-2015 09:10 AM
It doesn't find the port or are you looking for the first port found only?
If the port installs as #11 and you already have port #10, viFindRsrc will show port 10, viFindNext will show port #11.
10-12-2015 01:51 AM
Thanks for your support and valueable reply .