0% found this document useful (0 votes)
37 views

SPiiPlus C and C++ Library For Linux Based Systems Installation Guide

Uploaded by

pursuestar114
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

SPiiPlus C and C++ Library For Linux Based Systems Installation Guide

Uploaded by

pursuestar114
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

SPiiPlus C and C++ Library for Linux-

based Systems

Installation Guide
May 2024
Document Revision: 3.14.01
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide

SPiiPlus C and C++ Library for Linux-based Systems

Release Date: May 2024

COPYRIGHT

© ACS Motion Control Ltd., 2024. All rights reserved.

Changes are periodically made to the information in this document. Changes are published as release notes and later
incorporated into revisions of this document.

No part of this document may be reproduced in any form without prior written permission from ACS Motion Control.

TRADEMARKS

Windows and Intellisense are trademarks of Microsoft Corporation.

EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.

Any other companies and product names mentioned herein may be the trademarks of their respective owners.

PATENTS

Israel Patent No. 235022


US Patent Application No. 14/532,023
Europe Patent application No.15187586.1
Japan Patent Application No.: 2015-193179
Chinese Patent Application No.: 201510639732.X
Taiwan(R.O.C.) Patent Application No. 104132118
Korean Patent Application No. 10-2015-0137612

www.acsmotioncontrol.com

[email protected]

[email protected]

NOTICE

The information in this document is deemed to be correct at the time of publishing. ACS Motion Control reserves the right to
change specifications without notice. ACS Motion Control is not responsible for incidental, consequential, or special damages
of any kind in connection with using this document.

Version 3.14.01 2
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide

Revision History
Date Revision Description

May 2024 3.14.01 New Release

December 2023 3.14 New Release

February 2023 3.13.01 New Release

November 2022 3.13 New Version Release

April 2022 3.12 New Version Release

November 2021 3.11.01 New Version Release

August 2021 3.11 Correction to Install/Uninstall

March 2021 1.02 IDE instructions for VS and Eclipse

March 2021 1.01 Fedora-based systems support

February 2021 1.00 Initial Release for Debian-based systems

Version 3.14.01 3
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide

Conventions Used in this Guide


Text Formats

Format Description

Bold Names of GUI objects or commands

BOLD + UPPERCASE ACSPL+ variables and commands

Monospace + grey background Code example

Italic Names of other documents

Blue Hyperlink

[] In commands indicates optional item(s)

| In commands indicates either/or items

Flagged Text

Note - includes additional information or programming tips.

Caution - describes a condition that may result in damage to


equipment.

Warning - describes a condition that may result in serious bodily


injury or death.

Model - highlights a specification, procedure, condition, or


statement that depends on the product model

Advanced - indicates a topic for advanced users.

Version 3.14.01 4
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide

Related Documents
Documents listed in the following table provide additional information related to this document.
The most updated version of the documents can be downloaded by authorized users from
www.acsmotioncontrol.com/downloads.
Online versions for all ACS software manuals are available to authorized users at ACS Motion Control
Knowledge Center.

Document Description

SPiiPlus C Library Programmer's Guide A Guide describing the SPiiPlus C Library

Version 3.14.01 5
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide

Table of Contents
1. Introduction 7
2. Supported Systems 8
3. Unsupported Communication Channels 9
4. Unsupported Functions 10
5. Architecture 11
6. Suppplied Components 12
7. Installation and Uninstallation 13
8. User Mode Driver 14
9. Working with SPiiPlus C/C++ Library for Linux-based Systems 16
9.1 Working Remotely From Windows - Visual Studio 16
9.1.1 Enabling SSH on Ubuntu 16
9.1.2 Adding a Remote System to Visual Studio 17
9.1.3 Creating a Linux Project 19
9.2 Working Directly From Linux with Eclipse 22
10. Transferring Text Files Between Windows and Linux 26

Version 3.14.01 6
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
1. Introduction

1. Introduction
This document describes how to install and use the SPiiPlus C/C++ Library for Linux-based Systems.
The unsupported functions (as compared to the SPiiPlus C/C++ Library for Windows-based systems)
are specified in section Section 4, Unsupported Functions. Beyond that, the syntax matches that
described in the SPiiPlus C Library Programmer’s Guide.

Version 3.14.01 7
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
2. Supported Systems

2. Supported Systems
The following systems were tested:

Operating System
Processor Kernel version
Name Version Architecture

Ubuntu 22.04 64-bit x64 6.2.0-31-generic

Ubuntu 18.04 64-bit x64 5.4.0-62-generic

KUbuntu 18.04 64-bit x64 5.4.0-65-generic

RedHat
3.10.0-1160.el7.x86_
Enterprise 7.9 64-bit x64
64
Linux Server

3.10.0-
CentOS 7.9 64-bit X64
1160.95.1.el7.x86_64

To get the system version, type the following command in a shell.


Debian:

lsb_release -a

Fedora:
To get the Kernel version, type the following command in a shell:
Debian:

uname -r

Fedora:

hostnamectl

Both real and virtual machine environments are supported.

Version 3.14.01 8
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
3. Unsupported Communication Channels

3. Unsupported Communication Channels


The following channels are not supported in the SPiiPlus .NET Library for Linux-based Systems:
> Simulator

If the Simulator was started by a Windows PC, it is possible to connect to these channels
from a Linux computer by using the functions acsc_OpenCommEthernetTCP or acsc_
OpenCommEthernetUDP. The only operation which is not possible is starting Simulator
directly from a Linux computer.

Version 3.14.01 9
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
4. Unsupported Functions

4. Unsupported Functions
The following functions are not supported in the SPiiPlus C/C++ Library for Linux-based Systems:

Category Function Name

Communication Functions acsc_OpenCommSimulator

Callback registration Functions acsc_SetCallbackPriority

Version 3.14.01 10
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
5. Architecture

5. Architecture
Component
Description
Name

SystemD Daemon (equivalent to service in Windows). Responsible for all


ACS.service
the communication with the controller.

GUI application for controlling ACS.service. It is not mandatory to run this


ACS.UMD
application in order to communicate with controllers.

ACS.EStop Same as in Windows version.

The ACS service runs on ports 9998 and 9999. These ports must not be in use prior to
installation of the ACS Package.

Use of libACSCL_x64.a requires linking to the pthread library.

To verify whether the ACS.service is running, type the following command in a shell:

sudo systemctl status ACS.service

For example:

To reset the ACS.service, type the following command in a shell:

sudo systemctl stop ACS.service


sudo systemctl start ACS.service

Version 3.14.01 11
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
6. Suppplied Components

6. Suppplied Components
Path Component name Description

ACS Service
ACS.Service.out
executable

User Mode
ACS.UMD Driver
/usr/bin
executable

Emergency
ACS.EStop Stop
executable

DOTNET
/usr/bin/ACSMotionControl AvaloniaDemoProject
demo project

Dynamic-Link
libACSCL_x64.so
Library
/usr/lib/ACSMotionControl
Static-Link
libACSCL_x64.a
Library

ACS C Library
/usr/include/ACSMotionControl ACSC.h
header file

SPiiPlusCLibraryReferenceProgramme
r'sGuide.pdf
SPiiPlus.NET-Library-Programmers-
/usr/share/doc/ACSMotionContr Documentati
Guide.pdf
ol on files
SPiiPlus_C_and_Cpp_Library_for_
Linux-based_Systems_Installation_
Guide.pdf

Simple
/usr/share/samples/Measurem
MeasurementsDemo.out and sources measuremen
entsDemo
t application

Version 3.14.01 12
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
7. Installation and Uninstallation

7. Installation and Uninstallation


To install the 64-bits ACS package, navigate to the folder named ‘InstallationPackage’, and type the
following command in the shell:

sudo ./install.sh

This installation also installs all the required dependencies.


To uninstall the 64-bits ACS package, type the following command in shell:

sudo ./uninstall.sh

Version 3.14.01 13
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
8. User Mode Driver

8. User Mode Driver


ACS.UMD will be launched automatically after user login.
Ubuntu 18.04 - ACS.UMD in an applications window:

Version 3.14.01 14
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
8. User Mode Driver

RedHat Enterprise Linux 7.9 – ACS.UMD in applications menu, under “Other” section:

ACS.UMD UI tabs:

Version 3.14.01 15
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

9. Working with SPiiPlus C/C++ Library for Linux-based


Systems
Linux projects can be created and maintained directly on a Linux machine, or remotely, on a
Windows device. On Linux, the Eclipse development environment is supported; Visual Studio can be
used on Windows.

9.1 Working Remotely From Windows - Visual Studio


In order to create Linux projects via Visual Studio, install the “Linux development with C++” workload
using the Visual Studio Installer. In Visual Studio 2019 it can be found under the “Other Toolsets”
section:

Visual Studio connects a to a remote machine via the SSH protocol, so it is necessary to verify that
SSH is enabled in the remote machine. Enabling SSH might be different among different Linux
distributions.
As an example, this document covers this process on Ubuntu machines.

9.1.1 Enabling SSH on Ubuntu


First, install the package openssh-server using the following command:

sudo apt install openssh-server

Once the installation is finished, the SSH service will start automatically. To verify that the SSH
service is running, type the following command:

sudo systemctl status ssh

The service should be active:

Version 3.14.01 16
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

The final step is to open the SSH port on Ubuntu firewall. In order to do so type:

sudo ufw allow ssh

Now it is possible to connect via SSH from any remote machine. To get your IP address, type:

ip a

9.1.2 Adding a Remote System to Visual Studio


In the menu ribbon at the top of the Visual Studio window select "Tools" and then "Options".

Version 3.14.01 17
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

The Options window will be opened. Select “Cross Platform” from the menu:

Now click ADD, and fill in the details:

Host name - IP address of the remote machine


Port – 22 (SSH default port)
User name – username in the remote machine
Password – password of the specified username in the remote machine

Version 3.14.01 18
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

Once you click on CONNECT, the machine will be added to the list:

9.1.3 Creating a Linux Project


In the “Create a new project” window, filter on “C++” language and “Linux” platform and select
Console Application.

After the project is created, open Project Properties.

Version 3.14.01 19
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

In “General” tab, make sure that “Remote build machine” field holds the address of your machine, as
well as “Remote Debug Machine” field in “Debugging” tab.

Now the project is linked to the Linux Machine, so Visual Studio can build and deploy.
In order to use the ACSC.h header file, navigate to the “General” tab under the “C/C++” section and
add the following path in the “Additional Include Directories” field:

/usr/include/ACSMotionControl/

Version 3.14.01 20
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

To link with the ACSCL shared library (.so file), navigate to the “Input” tab in the “Linker” section and
add the following path, in the “Additional Dependencies” field:

/usr/lib/ACSMotionControl/libACSCL_x64.so

Likewise, to link with ACSCL static library (.a file), add the following path:

/usr/lib/ACSMotionControl/libACSCL_x64.a

Linking with the static library file (libACSCL_x64.a) requires linking also with “pthread”
library.
To do so, navigate to the "Command Line" tab in the "Linker section, and add "-pthread"
in the "Additional Options" field.

Version 3.14.01 21
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

At this point, the project is ready to build and deploy, but IntelliSense will still report errors. These
errors appear because IntelliSense does not have access to the header file.
To grant access to these files, open the "Options" window again and navigate to “Remote Headers
IntelliSense Manager”. Select “Update” for your machine.

9.2 Working Directly From Linux with Eclipse


In order to use ACSC.h header file, openthe Eclipse project properties and navigate to “Paths and
Symbols” tab under the “C/C++ General” section. Add the following path to the “Includes” tab (both
for GNU C and GNU C++ languages):

Version 3.14.01 22
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

/usr/include/ACSMotionControl/

Version 3.14.01 23
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

To link with the ACSCL shared library (.so file), navigate to the “Settings” tab under the “C/C++ Build”
section. Select “Miscellaneous” and add the following path in “Other objects” field:

/usr/lib/ACSMotionControl/libACSCL_x64.so

Similarly, to link with the ACSCL static library (.a file), add the following path:

/usr/lib/ACSMotionControl/libACSCL_x64.a

Linking with the static library file (libACSCL_x64.a) requires linking with “pthread” library
as well.
To do so, add “-pthread” in “Linker flags” field.

Version 3.14.01 24
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
9. Working with SPiiPlus C/C++ Library for Linux-

Version 3.14.01 25
SPiiPlus C and C++ Library for Linux-based Systems
Installation Guide
10. Transferring Text Files Between Windows and

10. Transferring Text Files Between Windows and Linux


If a text file was created in a Windows system it must be converted before reading it in a Linux
system. This conversion does not change the text, it only removes some invisible characters.
In order to do so, install the dos2unix application by the following command:

sudo apt install dos2unix

In order to use it, run :

sudo dos2unix path/to/text/file

Version 3.14.01 26
5 HaTnufa St.
Yokne'am Illit 2066717
Israel
Tel: (+972) (4) 654 6440 Fax: (+972) (4) 654 6443

Contact us: [email protected] | www.acsmotioncontrol.com

You might also like