Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

installing a .inf file on Labview

Solved!
Go to solution

Hello people I am trying to control a pololu Tic T825 stepper motor controller using labview 2019 SP1 64 bit. I am using windows 10 Enterprise 64 bit.

 

The controller is visible on the device manager and can be controlled successfully using the following drivers: https://www.pololu.com/docs/0J71/3.1

 

The company say that they don't have any labview drivers and so I assumed that I need to generate my own using 

The NI-Visa Driver wizard. (Is this the correct way to go?) I was able to successfully find the the relevant  USB connection and was able to generate what I named Prefix.inf

 

I have been struggling to sign the catalog (.cat) file and perform the installation and I wonder if people can point out what I am doing wrong (assuming going to the NI-Visa Driver wizard was correct) I followed the instructions on: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH1PCAW&l=sv-SE

 

Making a catalog file with:

 

Inf2Cat /driver:"C:\Users\ARTOF\Documents\National Instruments\NI-VISA\pololu\"/os:8_X64,8_X86,Server8_X64,Server2008R2_X64,7_X64,7_X86,Server2008_X64,Server2008_X86,Vista_X64,Vista_X86,Server2003_X64,Server2003_X86,XP_X64,XP_X86,2000

 

I made the cert: (without a password)

makecert -r -pe -n "CN=RobertS" -eku 1.3.6.1.5.5.7.3.1 -sky exchange -sv RobertS.pvk RobertS.cer

 

I converted the files to .pfx

pvk2pfx -pvk RobertS.pvk -spc RobertS.cer -pfx RobertS.pfx

 

I than installed both the .cer and the .pfx files into the Trusted Root Certification Authorities

 

finally I tried to sign

signing the file: SignTool sign /f "C:\Users\ARTOF\Documents\National Instruments\NI-VISA\pololu\RobertS.pfx" "C:\Users\ARTOF\Documents\National Instruments\NI-VISA\pololu\prefix.cat" 

 

I get an error saying: SignTool Error: No certificates were found that met all the given criteria.

 

from googling this error suggests that my certificates are not valid or something but they are in the  Trusted Root Certification Authorities folder. Also I of course can't install the .inf file until this is resolved.

 

I have attached all the relevant files if this is useful.

 

I would appreciate  any ideas or feedback on how to resolve this.

 

Thank you in advance

 

Robert

 

 

0 Kudos
Message 1 of 10
(7,782 Views)

Hello folks,

 

I see this has scared away a lot of people away. I found a way round this problem by disabling the driver writer check on windows 10. Documentation on how to do this can be found here:

 

https://windowsreport.com/driver-signature-enforcement-windows-10/#:~:text=Press%20and%20hold%20the%....

 

I got it to work with the first option. I then needed to pick the .inf file from the device manager by right clicking on the original USB driver and selecting the .inf file.

 

So happy days, NI visa now displace a raw USB socket as shown in the attached NI_Max.png. The question now is how does one communicate with this. If I open labview, NI-visa does not see this (Only the COM ports appear if I create a constant VISA reference when opening VISA).

 

NI has some detailed documentation on using piping of a USB raw socket :

 https://zone.ni.com/reference/en-XX/help/370131S-01/ni-visa/usingnivisatocommunicatewithyourusbdevic...

 

But I am not really sure how to figure out what to use. Pololu, have some help pages on communication through USB but they at least don't use the same language that is used in the NI article.

https://www.pololu.com/docs/0J71/12

 

Could somebody point me in the right direction (maybe first) to how one configures NI-VISA in NI-Max to send the listed commands and make the device respond? I would also greatly appreciate some ideas on how to then use that automation in LabVIEW for an interactive program.

 

Thanks in advance

Robert

0 Kudos
Message 2 of 10
(7,720 Views)
Solution
Accepted by topic author DrRob2020

Hi People, so I figured this out myself. In the end all of this driver signing was pointless as I didn't end up communicating with the stepper motor driver through MAX. I found it much easier to design a labview program around communicating with the controller though the built in command line communications. 

 

If somebody else want to control these stepper motor controllers simply start by installing the software that comes with the controller. After testing that everything works in their software you can make LabVIEW open the command line and use the built in communications  found here (Section 4.4) to make the controller do things: 

 

https://www.pololu.com/docs/0J71/all#4.4

 

I hope this speeds up others trying to interface with these.

 

Bye for Now

 

Robert

Message 3 of 10
(7,653 Views)

Hey Robert,

 

I was trying to get my Tic T825 to work with LabView through serial connection and I'm encountering problems myself. So you think there's no other way of controlling the Tic through LabView? By the way I'm trying to control the Tic to move a linear actuator and it does work on the Tic Control Center Software.

 

Thanks,

Ethan

0 Kudos
Message 4 of 10
(7,582 Views)

Dear Ethan, The problem at least with USB is that there is a complex communication protocol, which I beleive the RAW USB port can't figure out on its own. I suspected (Maybe somebody from NI can confirm) that one could try to control the USB communication  through the VISA Test panel. I expected that one could go into Input/Output and the USB control tab and input the various bRequest, wValue... etc needed to communicate, as described in: Section 11. USB command encodinghttps://www.pololu.com/docs/0J71/all#11

 

Alas, I never got it to respond and I found just using the command line commands to be a simple way around it. One big disadvantage I see to the way I did it is that it seems I will only be able to communicate with 1 Tic controller per computer, where I guess with the serial approach you are taking  tou will be able to control as many as you have COM ports.

 

I have not experience trying to make it work in a serial configuration. I would naively assume that you just solder the right ports to the correct pin, and then just use the serial communication system in LabVIEW to write commands. What specifically is not working?

 

Regards

Robert

 

 

0 Kudos
Message 5 of 10
(7,572 Views)

Hello Robert,

 

Did you try connecting the Tic through an Arduino? I tried just USB at first, but then I switched it to Arduino. My code is running fine and there is no error. But the Tic's light is red which indicates an error. So I think the signal I'm sending to the tic is to simple/code is to simple.

 

Thanks,

Ethan

 

0 Kudos
Message 6 of 10
(7,568 Views)

Hi Ethan, this looks very nice. I guess if it works then flashing red lights are not such a problem.

 

I guess you need to save a file or something with it's location so that your program knows where it is, or maybe you don't care about such details. I attached my code for the motor with the USB port in case you want to try it or it gives you ideas.

 

I hope it helps

 

Regards

Robert

0 Kudos
Message 7 of 10
(7,462 Views)

Can you please save in earlier version? I have LV 2017 and cant open this file

0 Kudos
Message 8 of 10
(5,846 Views)

HI viJay, please find attached

0 Kudos
Message 9 of 10
(5,833 Views)

@DrRob2020 wrote:

Dear Ethan, The problem at least with USB is that there is a complex communication protocol, which I beleive the RAW USB port can't figure out on its own. I suspected (Maybe somebody from NI can confirm) that one could try to control the USB communication  through the VISA Test panel. I expected that one could go into Input/Output and the USB control tab and input the various bRequest, wValue... etc needed to communicate, as described in: Section 11. USB command encodinghttps://www.pololu.com/docs/0J71/all#11


There is nothing that the computer could do for you to figure out the RAW USB. Raw USB simply gives you the methods to transfer bytes to and from the device over USB. What these bytes have to be, in which order and to which USB endpoint they need to be sent or read from is up to the device protocol description. If it is a standard USB class, you can read the according specifications on the USB consortium website and try to figure it out. It's only something like several 1000 pages of documentation per USB class. 😎

 

If it is a proprietary USB device class, all this information needs to come from the manufacturer of the device. In the case or your Pololu device this would be actually the documentation that you can find here in Section 11. As it uses Control Transfers to endpoint 0, it is relatively easy to implement in LabVIEW (you will need to use the VISA USB Control In and VISA USB Control Out functions). The complication is that it is a binary protocol and you need to pack the bits and bytes into the 8 bit byte stream that the string to Write and from Read is.

 

"index" would be wIndex field

"value" would be the wValue field

"request type" would be the value in the bmRequestType field of that documentation

"request" is the bRequest value

 

Once you have those 5 or so commands in Section 11 implemented, you can use them to read and write variables as documented in Section 8 of that manual.

 

However, as you have found, installing USB Raw drivers under Windows 10 is a pita, since drivers need to be signed for that to work. And NI can't sign them for you, because they guarantee with their name and reputation for any driver they sign, to not do malicious things to a computer. So you would need your own signing certificate to be able to sign that driver and such certificates cost between 100 to several 100 bucks per year.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(5,387 Views)