LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

k8055

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

 

0 Kudos
Message 21 of 42
(2,745 Views)
Hi Joseph would you mind posting your modified 2 card version to see if it works for me, as i have said before i am a total novice at this and have never used labview before.


if you can help me it'd be great

cheers


The Dwarfer
0 Kudos
Message 22 of 42
(2,741 Views)
Hi,

what i was doing in that vi in the sequence structure was 1) open device at address 0, 2) Write values to that device, 3) close that device, 4) open device at address 1, 5) write values to that device, 6) close that device. I am surprised that it is not working. The stuff that i wrote for joseph should work for you. I suggest that you try and get the vi working that he used that called both cards.

Try this

Phil

P.S. do read the whole of this post as you may find help further up.
0 Kudos
Message 23 of 42
(2,740 Views)
try what? is there meant to be a link there? i would like to try josephs program if thats ok.

cheers

dwarfer
0 Kudos
Message 24 of 42
(2,735 Views)

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 Smiley Happy

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

0 Kudos
Message 25 of 42
(2,729 Views)
sorry to be a pain but i can't open that file (it says it's v9) i only have v8 of labview. could you save it in v8 format for me?


cheers

The Dwarfer
0 Kudos
Message 26 of 42
(2,724 Views)
Try this.

It basically uses the while loop counter to work out if it is odd or even (i.e. whether it is divisible by 2 with or without a remainder). Just use this in your code to generate the 10101010 and write each value to the dll.

hope it gets you started

Phil
0 Kudos
Message 27 of 42
(2,721 Views)
Hi Phil,
I have got the card to pulse,doing some modification of the 1,0 VI that you had sent,and it works gr8.Only thing now is we will have to see if it can be read by the PLC counter.Cheerz for that.Smiley Happy
 
I am sorry but just have the 8.2.1 version here,so cant change the format of the previous VI Smiley Sad
 
Kind Regards
 
Joseph
0 Kudos
Message 28 of 42
(2,708 Views)
Hi Joseph,

If you go to the file menu, save for previous version then you should be able to (although i think this may not be available on the basic version). If you have problems post it and i'll convert it for you.

Best regards,

Phil
0 Kudos
Message 29 of 42
(2,705 Views)

Hi Dwarfer,

Ive saved the VI posted before for version 8.Hope itz okey now.

regards

Joseph

0 Kudos
Message 30 of 42
(2,704 Views)