quanser / hil_sdk_linux_x86_64

DEPRECATED
https://www.quanser.com/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

ubuntu 20.4. #2

Closed StefanJakubjak closed 2 years ago

StefanJakubjak commented 2 years ago

Hi i am on ubuntu 20.4. I can run experiments from examples on Quanser QUBE Servo 2 - USB but I would like to create block schemes in simulink and then run it on qube servo 2. Can you tell me if i can manage to that and how ? I tried to get c code to matlab but i can't find a way to transform this flags and get them into matlab: CFLAGS += -I/opt/quanser/hil_sdk/include LDFLAGS += -L/opt/quanser/hil_sdk/lib LIBS += -lhil -lquanser_runtime -lquanser_common -lrt -lpthread -ldl -lm -lc Also this sdk for windows contains MATLAB functions (API's) for accessing Quanser hardware, can you generate them for Matlab Linux. I inspected it briefly and there is hil_gateway.mexw64 which can be used only with matlab on windows. Could you please fast generate it for Matlab Linux ? I got task to try to make qube servo 2 work with simulink block scheme or scilab block scheme or labview block scheme on ubuntu by school for my final. Is there a way it can be done ?

petemartin commented 2 years ago

Hi, and thanks for reaching out to us. We don't currently support a Linux host, only a Linux target. That means that you can create MATLAB or Simulink code on Windows and then deploy it to a Linux machine, but we don't currently support creating MATLAB or Simulink models directly in Linux to interface to our hardware. If you have a QUARC license, then

  1. A QUARC runtime can be installed on Ubuntu and you can generate code from Simulink running on a Windows PC and target the Ubuntu machine on which to run the code. This process is very seamless and easy to use once it is set up, but does require a Windows PC.
  2. The HIL API for Matlab can be used to generate code on a Windows PC running MATLAB using MATLAB Coder. There are instructions in the QUARC User's Guide on how to do that (see QUARC/User's Guide/QUARC Basics for Scripts).

Both the options above require MATLAB to be running on a Windows PC, but the code can be targeted for the Ubuntu desktop and easily deployed, all from the Windows host. You could also call the C-API that is in this repository from MATLAB Simulink, but those paths are not currently provided by us and would be a fair bit of specialized work to develop. I will post up again here in the future if circumstances change.

StefanJakubjak commented 2 years ago

Thank you for very fast response. I have in deed quarc on Windows. Can you provide me link for runtime ? I can’t find it somehow. I will try both ways. I want qube servo 2usb to be connected to ubuntu server and controll experiments from far for example from windows. Is there a way i can write parameters from scope or from qube to file during experiment in Matlab ? I want to show them in real time during experiment on a website. Can i generate code on windows pc then get it on usb turn off windows pc and run it on ubuntu ?

petemartin commented 2 years ago

We should be able to get you set up with a configuration that will work. You may need an updated license file to target Linux. Would you mind emailing us directly at tech@quanser.com with the subject "Ubuntu Target attn: Peter Martin"? Thanks