09-29-2015 09:05 AM
I'm not sure how to interpret "0-24": the hiphen should mean "from x to y" but while I understand how it works with single digits, I am a bit lost when dealing with two digits. Does it mean that it will find port 24 and 240 only? Will it find port 204?
09-29-2015 10:22 AM
@Wolfgang wrote:
if you say so...
all I can tell is that viFindRsrc ( resource_manager_handle, "ASRL[0-9]*::?*INSTR", &find_handle, &return_count, instrument_descriptor ); does find all my serial ports, and I do have more than 30
Then you'll have to explain to the OP why it doesn't work for him.
09-29-2015 10:25 AM
@RobertoBozzolo wrote:
I'm not sure how to interpret "0-24": the hiphen should mean "from x to y" but while I understand how it works with single digits, I am a bit lost when dealing with two digits. Does it mean that it will find port 24 and 240 only? Will it find port 204?
http://www.regexr.com/ is a very good website
09-29-2015 04:16 PM
@nyc_(is_out_of_here) wrote:
Then you'll have to explain to the OP why it doesn't work for him.
ah why, my code is working fine
Personally I think that the original post should provide some more details for better help, such as VISA version, a screen shot of MAX showing the serial port configuration (does he really have 255 serial ports?), the sample code and the respective return values for port 1 - 10...
09-29-2015 04:33 PM
@RobertoBozzolo wrote:
I'm not sure how to interpret "0-24": the hiphen should mean "from x to y"
My understanding is different (but can be wrong, of course)
from the help: [list] : Matches any one character from the enclosed list
To me 'any one character' means that it matches single characters, not numbers, so in my understanding 0-24 is interpreted as 0-2 and 4, i.e., 0, 1, 2, 4
[0-24]* thus should find both 24, 240, 204, but I do not have that many ports to verify
At least it would explain your finding why ASRL[0-20]*::?*INSTR" fails to recognize port 4, in my understanding it will only search for port numbers 0, 1, 2, 10, 11, 12, 20, 21, 22, 100, 101, 102,...
I agree that a suitable example (in the documentation) would be useful.
09-29-2015 04:46 PM
As far as I can understand I second your opinion_ 0-24 means "0 to 2 AND 4" so it detects port 4, 14 and 24 but not port 3, 24, 36...
It would be interesting to see MAX configuration in patil PC: if some port is not recognized there it won't be listed from viFindRsrc. Nevertheless he should be able to interactively create in nmAX the port(s) not listed, and see them in CVI after thet.
09-29-2015 10:42 PM
hi,
Thanks to all for reply.
yes i tried all d way but its detecting only upto o-9.
Please if any one have valid woeking code ,please share it . It helps me lot .
Thnak you .:)
09-30-2015 02:08 AM
09-30-2015 02:28 AM
HI
Thanks for reply .
Com 10 is showing in MAX (MEasurement and Automation Explorer), where i add/check list of all port .
10-06-2015 10:54 PM
hi
I still struggling in this issue, please give me proff solution .
i tryed all d way but its not working properly . please give me solution .
thanks