Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing PFI terminal while task is ruuning

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 10
(4,697 Views)

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

0 Kudos
Message 2 of 10
(4,684 Views)

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

0 Kudos
Message 3 of 10
(4,681 Views)
Solution
Accepted by topic author anuvohr

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.


Message 4 of 10
(4,679 Views)

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

0 Kudos
Message 5 of 10
(4,661 Views)

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

 

Message 6 of 10
(4,657 Views)

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

0 Kudos
Message 7 of 10
(4,632 Views)

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

0 Kudos
Message 8 of 10
(4,618 Views)

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

0 Kudos
Message 9 of 10
(4,615 Views)

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 

0 Kudos
Message 10 of 10
(4,613 Views)