Jump to content
  • 0

CConfigScan & CInScan with QUAD08


Ricky Ooi

Question

I am having a DAQ device with model QUAD08. I would like to perform Encoder scan for all channels (from Chan 0 - Chan 7). Here are some of my questions:

1. I looked into universal library documentation and notice there is "mapCounter" argument. I am not understand what is the used of this argument and what value should I put if I would like to configure each of the counter channel?
public MccDaq.ErrorInfo CConfigScan(int counterNum, MccDaq.CounterMode mode, MccDaq.CounterDebounceTime debounceTime, MccDaq.CounterDebounceMode debounceMode, MccDaq.CounterEdgeDetection edgeDetection, int tickSize, int mapCounter)

2. What is the correct step to run CInScan for all encoder channel? Is there any parameter I have to pay attention, like ScanOptions, CounterMode, MemData format, etc?

Edited by Ricky Ooi
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello,

The map channel is used with counter inputs that lack a gate input. A typically situation is when the counter input is configured to measure the time between two signals. The counter input is for the first signal and map channel defines the input of the second signal. For encoder, totalize, period or frequency it's ignored. 

The following KB article show how to configure an input for encoder mode. https://kb.mccdaq.com/KnowledgebaseArticle50793.aspx

Best regards,

John

Link to comment
Share on other sites

  • 0

Hi @JRys,

Thank for the code sharing and I got the reading. Just curious what does the reading represent? Is it referring to Number of Encoder Pulse received or other thing?

Based on the diagram below, the reading is obtained when I move my motors. Is there any reason why there is a rebounced in signal when I try to move the motors?

Problem 2.PNG

Problem.PNG

Edited by Ricky Ooi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...