LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I acquire an encoder using driver vi in Simulation Interface Toolkit?

I am setting up a Simulink model that contains a control algorithm to run in real-time on a Real-Time Target (converted desktop PC). Basically the application is I am trying to control an actuator position using a motor. I provide the commanded position, and feedback includes current motor velocity, and current actuator position. The model returns the current value that is supplied to the motor driver.

I am using Simulation Interface Toolkit for this effort. I have gone through all the steps to convert the model into a model DLL. I am now at the step to create a driver vi to map the hardware I/O to the model I/O. I have the following model I/O requirements

1 Feedback motor velocity

1 Setpoint Actuator position

1 Feedback Actuator position

1 Output current to motor driver

 

I was hoping to use an encoder for the Feedback Actuator position but it seems like this is not easy to configure in SIT as compared to Analog I/O and Digital I/O. My question is, is it possible to map a counter? Do I have to create a custom driver.vi?

0 Kudos
Message 1 of 3
(2,505 Views)
For your second question please refer to the following article:

Creating a Custom I/O Driver with Simulation Interface Toolkit 3.x.

There is a section that is titled When You May Need to Create a Custom Hardware I/O Driver Manually which should answer that question. As for your first question, I have not found anything that says that you can map counters. What version are you using? In the 5.0.1 Readme and it states under What's new in 5.0 "Updated dialog for doing hardware I/O mappings—All hardware types configured and mapped in a single dialog." I have not checked the dialog. Does it have counters as an option?

In the same section it also says "Increased I/O in default FPGA Bitfiles—The default FPGA bitfiles now have 8 analog in, 8 analog out, 40 digital in, 40 digital out, 8 PWM in, and 8 PWM out channels." This does not specify counters; but you are using DAQmx not FPGA right?
Vince M
Applications Engineer
0 Kudos
Message 2 of 3
(2,488 Views)

Vince

Thanks for your reply.

I have across the article that you linked. I did not want to resort to that effort as it looks more time consuming than going through the dialog. I have SIT 5.0.0 currently installed. I don't think this is possible in 5.0.0 but I haven't fully tried yet. I was planning on creating a simple model in simulink that takes in one input and adds a constant value to it and then sends this result as an output. Of course I should be able to compile this simple model into a dll and then I will try creating a driver vi for it to see what options I am provided in the Hardware I/O dialog box. 

I still have to ask, how can I upgrade to 5.0.1?

 

0 Kudos
Message 3 of 3
(2,486 Views)