08-07-2013 08:57 PM
i am working on instrument automation project in which i am passing an array of some instrument list, which contains instrument name and the data to program the instrument, with the help of the match regular expression vi i am separating instrumetn name and the data in two arrays, for every instrument name i am having one case structure, in an array when that particular instrument comes program goes to that case structure, same way i want that in case of any particular instrumetn , it should process values corresponding to that one instrument only, i have tried several methods but none is giving the xpected result.
attached below is the vi
08-07-2013 11:56 PM
Give one example what is input and what is expected output.
Attach any sample for reference
Thanks
08-08-2013 12:19 AM
e.g. in list of array in vi one instrument is 8741(GPIB::2::INSTR,40,4,False),
now in this list first with the help of match regular expression vi i am separating instrument name part( in this case 8741, anything written before bracket comes under instrument name) and data (i.e. address, voltage, current and other necessary controls to program the instrument) in second part, than for every different instrumetn name i am having separate case structure , in that case strucutre i have to process this data means i.e the values within the bracket to the driver ,
i am getting problem in data part, as you can see in my vi i have made the case structure for every different instrument i am working upon, now problem is that i want to sen the data e.g in case of 8741 i want to send the data corrsponding to 8741 i.e GPIB::2::INSTR,40,4,False only to process but what is happening since it is checking whole aray value of that data it is changing data value every time even if 8741 is not there in the list, i dont want this.
if i am doing this with for loop i.e if i am keping all the data values in every instrument case strucutre in for loop than although it is taking only that particular instrument value but instead of taking one by one in array it is taking all the values for 8741 that are present in array simultaneously.
08-08-2013 01:55 AM - edited 08-08-2013 01:56 AM
Hi ritu,
Actually I am busy with some other work and not able to read all the things , I am attaching one VI let me know if it meets your requirement or what change you need
Thanks
08-08-2013 02:19 AM
Hello Ranjeet, Thanks for the reply...
The vi that you have send i am also working the same way just instead of search\split string i am using match regular expression, i am also getting the same ouput, the problem that i am getting is executing data with the same corresponding instrument, once when you will get time, you can see the vi that i have attached, than you might get clear picture of where i am getting problem. Anyways you can see vi whenever you are free, and thanks again for the help
08-08-2013 02:34 AM
@Ritu wrote:
i am getting problem in data part, as you can see in my vi i have made the case structure for every different instrument i am working upon, now problem is that i want to sen the data e.g in case of 8741 i want to send the data corrsponding to 8741 i.e GPIB::2::INSTR,40,4,False only to process but what is happening since it is checking whole aray value of that data it is changing data value every time even if 8741 is not there in the list, i dont want this.
Can you please elobrate this?
What is checking whole array value of that data means ?
Thanks