Skip to content

Commit

Permalink
docs: update for halcmd u64/s64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hansu committed Jan 11, 2024
1 parent b5873c9 commit f541206
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
10 changes: 4 additions & 6 deletions docs/src/common/glossary.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,8 @@ Servo Loop::
velocity of an motor equipped with a feedback device.

Signed Integer::
(((Signed Integer))) A whole number that can have a positive or
negative sign. In HAL it is known as s32. (A signed 32-bit
integer has a usable range of -2,147,483,647 to +2,147,483,647.)
(((Signed Integer))) A whole number that can have a positive or negative sign.
In HAL it is usually a <<sub:hal-s32,s32>>, but could be also a <<sub:hal-s64,s64>>.

Spindle::
(((spindle))) The part of a machine tool that spins
Expand Down Expand Up @@ -364,9 +363,8 @@ Units::
(((units))) See "Machine Units", "Display Units", or "Program Units".

Unsigned Integer::
(((Unsigned Integer))) A whole number that has no sign. In HAL
it is known as u32. (An unsigned 32-bit integer has a usable range of
zero to 4,294,967,296.)
(((Unsigned Integer))) A whole number that has no sign.
In HAL it is usually a <<sub:hal-u32,u32>> but could be also a <<sub:hal-u64,u64>>.

World Coordinates::
(((world coordinates))) This is the absolute
Expand Down
2 changes: 1 addition & 1 deletion docs/src/gui/pyvcp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ This is usually set as the last command so that HAL shuts down when the panel is
== Widgets(((PyVCP Widgets Reference)))

HAL signals come in two variants, bits and numbers.
Bits are off/on signals. Numbers can be 'float', 's32' or 'u32'.
Bits are off/on signals. Numbers can be 'float', 's32', 'u32', 's64' or 'u64'.
For more information on HAL data types see the <<sec:hal-data,HAL Data>> section.
The PyVCP widget can either display the value of the signal with an indicator widget,
or modify the signal value with a control widget.
Expand Down
17 changes: 16 additions & 1 deletion docs/src/hal/basic-hal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ linkps parport.0.pin-02-out X-Step
==== newsig

the command `newsig` creates a new HAL signal by the name _<signame>_ and the data type of _<type>_.
Type must be 'bit', 's32', 'u32' or 'float'. Error if _<signame>_ already exists.
Type must be 'bit', 's32', 'u32', 's64', 'u64' or 'float'. Error if _<signame>_ already exists.

.Syntax and Examples of `newsig`
[source,{hal}]
Expand Down Expand Up @@ -309,6 +309,21 @@ A 'u32' number is a whole number that is positive only.

- u32 values = integer numbers from 0 to 4294967295

[[sub:hal-s64]]
=== s64(((HAL s64,s64)))

An 's64' number is a whole number that can have a negative or positive value.

- s64 values = integer numbers from -9,223,372,036,854,775,808 to
+9,223,372,036,854,775,807

[[sub:hal-u64]]
=== u64(((HAL u64,u64)))

A 'u64' number is a whole number that is positive only.

- u64 values = integer numbers from 0 to 18,446,744,073,709,551,615

[[sec:hal-files]]
== HAL Files(((HAL Files)))

Expand Down
4 changes: 2 additions & 2 deletions docs/src/hal/comp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ In this case, r-strings are particularly useful, because the backslashes in an r
r"\fIexample\fB"
----

* 'TYPE' - One of the HAL types: 'bit', 'signed', 'unsigned', or 'float'.
The old names 's32' and 'u32' may also be used, but 'signed' and 'unsigned' are preferred.
* 'TYPE' - One of the HAL types: 'bit', 's32', 'u32', 's64', 'u64' or 'float'.
The names 'signed' and 'unsigned' may also be used for 's32' and 'u32' but 's32' and 'u32' are preferred.
* 'PINDIRECTION' - One of the following: 'in', 'out', or 'io'.
A component sets a value for an 'out' pin, it reads a value from an 'in' pin, and it may read or set the value of an 'io' pin.
* 'PARAMDIRECTION' - One of the following: 'r' or 'rw'. A component sets a value for a 'r' parameter, and it may read or set the value of a 'rw' parameter.
Expand Down
8 changes: 5 additions & 3 deletions docs/src/hal/halmodule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ For parameters, the arguments are: parameter name suffix, parameter type, and pa
.HAL Option Names
[width="100%",cols="<3s,4*<"]
|===
|Pin and Parameter Types: |HAL_BIT |HAL_FLOAT |HAL_S32 |HAL_U32
|Pin Directions: |HAL_IN |HAL_OUT |HAL_IO |
|Parameter Directions: |HAL_RO |HAL_RW | |
|Pin and Parameter Types: |HAL_BIT |HAL_FLOAT |HAL_S32 |HAL_U32 |HAL_S64 |HAL_U64
|Pin Directions: |HAL_IN |HAL_OUT |HAL_IO | | |
|Parameter Directions: |HAL_RO |HAL_RW | | | |
|===

The full pin or parameter name is formed by joining the prefix and the
Expand Down Expand Up @@ -173,6 +173,8 @@ Use these to specify details rather then the value they hold.
* HAL_FLOAT
* HAL_S32
* HAL_U32
* HAL_S64
* HAL_U64
* HAL_IN
* HAL_OUT
* HAL_RO
Expand Down
5 changes: 4 additions & 1 deletion docs/src/hal/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,11 @@ Type:: (((HAL Type)))
- float - a 64 bit floating point value, with approximately 53 bits of
resolution and over 1000 bits of dynamic range.
- u32 - a 32 bit unsigned integer, legal values are 0 to 4,294,967,295
- s32 - a 32 bit signed integer, legal values are -2,147,483,647 to
- s32 - a 32 bit signed integer, legal values are -2,147,483,648 to
+2,147,483,647
- u64 - a 64 bit unsigned integer, legal values are 0 to 18,446,744,073,709,551,615
- s64 - a 64 bit signed integer, legal values are -9,223,372,036,854,775,808 to
+9,223,372,036,854,775,807

Function:: (((HAL:Function)))
Real hardware components tend to act immediately on their inputs.
Expand Down

0 comments on commit f541206

Please sign in to comment.