SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I log speed from an encoder and digital signals

Hi,

 

I have a motor with a quadrature encoder and wheel attached that drives a robot. I also have a digital signal in the robot that controls power to the motor as a safety system. My robot has a max speed I set and if for some reason it goes over that speed the digital signal will go low to turn off power to the motor for safety reasons. The test I need to do is force the robot to go over the speed limit by slowly increasing the speed and verify the digital signal turns off the power. But most importantly the shutdown has to be done within 200ms of the over-speed condition.

 

I have a cDAQ-9178 and 9401 module. Since direction for this test doesn’t matter I am only using one channel of the quad encoder. I want to monitor the speed using the encoder and the logic level of the digital signal so I can measure the time from when the robot goes over the speed limit to when the digital signal goes low. I would like to save the data for each test I perform if possible. All signals are 5V.

 

I’m just learning SignalExpress and only a beginner in LabVIEW so any help would be appreciated.

 

I was able to get the speed using the ‘DAQmx Acquire Counter Frequency’ but it seems like I can’t log it to make measurements. I calculated that the robot will travel 0.00062341 meters per encoder pulse. 1024 counts per revolution encoder, 3 revolutions per second max.

 

Attached a simple pic as an example.

 

0 Kudos
Message 1 of 3
(5,045 Views)

how are you attempting to log it (save to ASCII or log to file via the Record feature)? and is it just the counter freq that will not log or is it all your signals?

posting a copy of your .seproj file would be a great help in this case.

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 2 of 3
(5,024 Views)

I was able to log the digital signal but no luck on logging the frequency signal from the encoder. It says in the help window that SignalExpress doesn't log frequency. I tried recording the encoder to an ASCII file, but it puts headers after each reading and SignalExpress can't read it back for some reason.

 

I can't log into the forums from work so I have to do this from home so I don't have my project file. It would have been useless anyway since I didn't get very far. All I had was two acquire signal tasks; one for the encoder and one for the digital signal. Since I couldn't log it I didn't go any further. I was thinking of doing a LabVIEW VI for this instead unless someone has any ideas on how to help me get started. I have been wanting to try SignalExpress and thought this would be a good first project to try it out. But it didn't end up being very easy or I'm missing something.

0 Kudos
Message 3 of 3
(5,017 Views)