LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ timing

Solved!
Go to solution

Hello,

 

I am trying to run what I preceived to be a very simple VI. I am using a DAQ assistant connected to a NI9401 which is housed in an NI9188. Wired into this is a motor encoder. What I was trying to do was record the number of encoder signal pulses in order to calculate the speed. (2048 pulses per revolution)

 

I am running the system for 5 seconds max during the pre-testing stages but I am finding that the data being obtained is timed over 40 seconds. Can anyone advise me as to where I am going wrong? or a simpler/more effiecient way of obtaining these results.

 

Regards

 

Joshua

Download All
0 Kudos
Message 1 of 4
(2,410 Views)
Solution
Accepted by topic author newbee1

that because you think you are passing "Time" to excel and you are. but the way LabVIEW thinks of time.  The value you send to excel will increment by 1 each second.  Excel thinks time increments by 1 each DAY! so your displayed time is off by a factor of 86400.

 

What you need is something like this:

!2.png

That function you can't find on your palattes is available from the link.  You may need to adjust the BD Timestamp constant for you local zone (it doesn't travel well across timezones but efforts are being contemplated)


"Should be" isn't "Is" -Jay
Message 2 of 4
(2,384 Views)

I don't think this is a time formatting issue.

 

But I am confused since that data doesn't seem to match the VI.

 

1)The Write To Measurement File is set up to overwrite the file if it already exists.  But the Excel sheet seems to show several runs.

2) The Excel sheet seems to be showing the counter value each second.  But the DAQmx task is setup to output frequency.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,377 Views)

Thankyou for both of your responses. I have posted another question relating to DAQ timing if either of you both are able to provide some insight.

 

Best wishes

 

 

0 Kudos
Message 4 of 4
(2,345 Views)