08-21-2012 05:44 AM
Hi
I have the following code which ouputs two pules on selected PFI lines. For e.g ctr0 on PFI1 and ctr1 on PFI2, Now I want that while my task is running after one minute,the ctr0 should shifted PFI3 and ctr1 to PFI4.Further after one minute ctr0 to PFI5 and ctr1 PFI6. I want this operation because I have only two counters on USB 6289 device with BNC2120 on connector0 and SCB68 on connector1.
How is it possible to do this??
Best Regards
Anurag
Solved! Go to Solution.
08-22-2012 09:08 AM - edited 08-22-2012 09:10 AM
HI
While you are runnig the VI, it isn't possible to change the PFI line. You have to stop the task and change the setting and start again the task.
This is the only way which I knows.
best regards
Bernhard
08-22-2012 09:22 AM
Hi Bernhard
Thanks for your reply.....,
I tried it alot but no success but it does not works. Well it was required for my application
While I have altenative for my problem:
Can I use digital port output which gives only one line high at a time.Then after one minute 2nd line goes high.
for e.g
00000001
after one minute
00000010
after one minute
00000100
after one minute
00001000
after one minute
00010000
after one minute
00100000
after one minute
01000000
after one minute
10000000
after one minute
then again 00000001 and so on.....
Is it possible to do this operation on digital output port??
Thanks again for your reply...
Regards,
Anurag
08-22-2012 09:58 AM
I think one possibility are the following way.
I can't test it at the moment, while I have no hardware, but I think it should be work.
08-23-2012 05:01 AM
Thanks a lot Mr.Bernhard.....
Yes,It is working perfectly fine. This will solve my purpose. can you just give me little explaination about why replace array subset was used. I did not understood that.
Thanks a lot again....:)
Best Regards,
Anurag
08-23-2012 06:31 AM
Hi Anurag
With the Quotient&Remainder VI you get an Arrayindex for the subset VI.
e.g. iterraltion =0 the x-y*floor output is also 0
iterration = 1 the x-y*floor output is also 1
.
.
.
iterration = 7 the x-y*floor output is also 7
iterration = 8 the x-y*floor output is also 0
iterration = 9 the x-y*floor output is also 1
...
so you get everytime the rest of the iteration divided through 0.
You use the rest for indexing the array and set the value from false to true for the
topically index. Attention that the array indexing started at 0. Thus you have to diveded trough 7 and not 8.
In the next iteration the whole array is false again but the new topically index set one value of the array to True.
Best regards
Bernhard
Applications Engineer Munich
08-27-2012 09:10 AM
Hello Mr.Bernhard,
I have one small doubt can we add delay between digital ouputs going high?? I mean when port0 line0 shifts to port line1,Can I get small time of 5 seconds for which all o/p's are low??
i.e port0 line0 goes low before it shifts to port line1,all o/p's should be low for 5seconds,rest of the program remains the same.
I tried inserting the delay vi in the while loop but it does not works.
Regards,
Anurag
08-28-2012 04:45 AM
Hi Mr. Bernhard,
I did it some how by my self today...,but your intial help was the main key. Thanks a lot again for your help...:)
Best Regards,
Anurag Vohra
TU-Chemnitz,Germany
08-28-2012 05:20 AM
Sorry for may late answere.
I was away on Friday and yesterday. I'm pleased that you found out the solution for your last question.
Best regards
Bernhard
08-28-2012 06:06 AM
Hi Mr.Bernhard,
No issues at all sir...,I tried it today by inserting one write function and two delays function,one for each write function and it worked...
Best Regards
Anurag