From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200587 - "Count Edges (DAQ-STC)" - "Generate Pulse Train (DAQ-STC)" and DAQmx Read in one VI

hello,
 
I'm using the example "Count Edges (DAQ-STC).vi" in combination with "Generate Pulse Train (DAQ-STC)". You will get the settings of source and gate from the picture bellow. (count edges at the bottom .... generate pulse train at the top).
 
I have also extended my VI by using DAQmx Read and DAQmx Write to get information about the end switches on the axes.
 
Do the pulse generation and edge counter some kind of locking the lines that I try to read and write? 
 
Kind regards, peter
0 Kudos
Message 1 of 10
(3,516 Views)
Hi!

Can you please make a screenshot of the error? In Addition please make a screenshot of your vi, so I can see the settings.

Thanks,
Hendrik
0 Kudos
Message 2 of 10
(3,500 Views)
Hello honsel,
 
thank you for your reply. I have tried to add an attachment when I posted that question, but .... it didn't work.
 
How can I do this?
 
I entered the path of the vi but I can't find a button "add" or "upload".
 
kind regards peter
 
ps: I'm very sorry for asking the most stupied question ever 🙂
0 Kudos
Message 3 of 10
(3,485 Views)

ah.... you don't need to "add" or "upload" .... yeah it works!

 

kind regards peter

0 Kudos
Message 4 of 10
(3,485 Views)
Hi!

Please look at the link:

http://forums.ni.com/ni/board/message?board.id=250&message.id=23536

Best regards,
Hendrik
0 Kudos
Message 5 of 10
(3,478 Views)

Hello Hendrik,

I'm sorry, but I don't know what you mean. It just links to my first post.......

kind regards peter

Download All
0 Kudos
Message 6 of 10
(3,471 Views)
Hey Peter,

sorry that was my mistake, here the correct link:

http://forums.ni.com/ni/board/message?board.id=250&message.id=20597&requireLogin=False

Best regards,
Hendrik
0 Kudos
Message 7 of 10
(3,464 Views)

Hey Henrik,

this was very helpful!!! Thank you.

But I can't let you go :).... Now I must ask you how I can solve the problem:

I want to create a continuous pulse train on the counter output and at the same time I want to count the pulses. This would work in my vi but if my device (a plotter) reaches the end switches, it has to stop. And the only way I'm able to get the state of the switches is to use DAQmx Read, isn't it?

kind regards peter

0 Kudos
Message 8 of 10
(3,462 Views)
Hey Peter,

there are example vis, how to create a train pulse in the Example Finder. In addition there are examples of counting edges. You have to do that with two counters. The first generates the pulse and the second counts the edges. You have to connect the Counter 0 Out to the Counter 1 Source.

Do you want to stop the measurement with a trigger? Can you explain that in detail?

Best regards,
Hendrik
0 Kudos
Message 9 of 10
(3,457 Views)
Hello Hendrik,
 
I used the examples "Write/Read 1 Pt to Dig Line (E).vi" and it works simultanously :).
It's also possible for the second counter to use "Misc" - > "other counter TC" ... and the counter will use the frequency from the first.
 
But now I've another problem:
I want to change the state of 1 digital line... I also know how, but when I use the counter at the same time, the state of the line is true 😕 Maybe the state changes, because the counter uses the whole port??
 
kind regards peter 
 
ps:
I attached an image of the counter settings and the whole VI
Download All
0 Kudos
Message 10 of 10
(3,451 Views)