08-06-2007 09:35 AM
Hi,
Think it would be worthwhile if you read this
Hi Joseph,
I've taken a look at the origional vi and i come to the conclusion that it's not very well written (and yours too). The reason that your guetting 100% CPU usage is that you have a loop going as fast as it possibly can without stopping for a breather. This means that it is going to steal all the CPU resourses that it can. Hence 100% usage.
The reason that your vi doesn't work (try using the highlight execution tool and watch a couple of iterations of your program to follow what is happening) is that you have two seperate loops that are both making calls to the same dll. They are going to have a race to use it and which ever one gets their first wins, hence only seeing one channel do stuff. I have rewritten what you did to call the first card, write values for a certain amount of time (500 ms) and then turn the digital channels off. It then calls the second card sets the channels and then waits. I hope it works (i don't have a K8055 to try it out with).
Think you are having the same prob of 2 loops running simultaniously.
Regards
Joseph
08-06-2007 09:46 AM
08-06-2007 09:48 AM
08-06-2007 09:53 AM
08-06-2007 10:21 AM
Hi,
I did a small modification with what Phil had given me and came up with this VI.You should be able to control 2 cards with this one,cuz the digital outs works fine with me.The digital inputs dose have some issues tough.But atleast 2 cards can be controlled simlutaniously.Please dont mind the shabbiness n ta VI ![]()
Also I wanted to ask if any one had any simple VI by which I can generate a 1 and 0 in order..like in one after the other.I just wan to create a pulse output through the digital outputs of this card(K8055 USB). I tried looking through the generate pulse train examples but all are very complicated and use either the pulse genrate icon,which i dont know if one can use with this card.My plan is to output a 1 and 0 so tat i can get a pulse...and vary the time..so that the frequency is changed.
Anyone out ter having any idea about this,please do help out.
Kind regards
Joseph
08-06-2007 10:28 AM
08-06-2007 10:41 AM
08-07-2007 04:45 AM
08-07-2007 04:51 AM
08-07-2007 04:57 AM
Hi Dwarfer,
Ive saved the VI posted before for version 8.Hope itz okey now.
regards
Joseph