zaber-motion 7.15.0__py3-none-win_amd64.whl → 8.0.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zaber_motion/__init__.py +1 -0
- zaber_motion/ascii/__init__.py +0 -1
- zaber_motion/ascii/axis.py +29 -0
- zaber_motion/ascii/axis_settings.py +27 -0
- zaber_motion/ascii/device.py +28 -0
- zaber_motion/ascii/device_settings.py +26 -0
- zaber_motion/ascii/lockstep.py +0 -45
- zaber_motion/ascii/pvt_sequence.py +0 -181
- zaber_motion/ascii/servo_tuner.py +28 -104
- zaber_motion/ascii/stream.py +0 -275
- zaber_motion/binary/connection.py +17 -4
- zaber_motion/dto/__init__.py +1 -0
- zaber_motion/dto/ascii/__init__.py +0 -1
- zaber_motion/dto/ascii/response.py +4 -1
- zaber_motion/dto/ascii/simple_tuning.py +18 -17
- zaber_motion/dto/ascii/unknown_response_event.py +4 -1
- zaber_motion/dto/requests/__init__.py +2 -0
- zaber_motion/dto/requests/get_command_unit_conversion_response.py +54 -0
- zaber_motion/dto/requests/set_simple_tuning.py +31 -31
- zaber_motion/dto/requests/unit_convert_native_request.py +91 -0
- zaber_motion/dto/unit_conversion_descriptor.py +93 -0
- zaber_motion/library.py +1 -1
- zaber_motion/microscopy/objective_changer.py +1 -69
- zaber_motion/unit_table.py +114 -0
- zaber_motion/version.py +1 -1
- {zaber_motion-7.15.0.dist-info → zaber_motion-8.0.0.dist-info}/METADATA +1 -1
- {zaber_motion-7.15.0.dist-info → zaber_motion-8.0.0.dist-info}/RECORD +31 -29
- zaber_motion_bindings/zaber-motion-core-windows-amd64.dll +0 -0
- zaber_motion/dto/ascii/lockstep_axes.py +0 -108
- {zaber_motion-7.15.0.dist-info → zaber_motion-8.0.0.dist-info}/LICENSE.txt +0 -0
- {zaber_motion-7.15.0.dist-info → zaber_motion-8.0.0.dist-info}/WHEEL +0 -0
- {zaber_motion-7.15.0.dist-info → zaber_motion-8.0.0.dist-info}/top_level.txt +0 -0
zaber_motion/__init__.py
CHANGED
|
@@ -16,6 +16,7 @@ from .dto.log_output_mode import LogOutputMode as LogOutputMode
|
|
|
16
16
|
from .dto.measurement import Measurement as Measurement
|
|
17
17
|
from .dto.named_parameter import NamedParameter as NamedParameter
|
|
18
18
|
from .dto.rotation_direction import RotationDirection as RotationDirection
|
|
19
|
+
from .dto.unit_conversion_descriptor import UnitConversionDescriptor as UnitConversionDescriptor
|
|
19
20
|
from .exceptions.bad_command_exception import BadCommandException as BadCommandException
|
|
20
21
|
from .exceptions.bad_data_exception import BadDataException as BadDataException
|
|
21
22
|
from .exceptions.binary_command_failed_exception import BinaryCommandFailedException as BinaryCommandFailedException
|
zaber_motion/ascii/__init__.py
CHANGED
|
@@ -42,7 +42,6 @@ from ..dto.ascii.get_setting import GetSetting as GetSetting
|
|
|
42
42
|
from ..dto.ascii.get_setting_result import GetSettingResult as GetSettingResult
|
|
43
43
|
from ..dto.ascii.io_port_label import IoPortLabel as IoPortLabel
|
|
44
44
|
from ..dto.ascii.io_port_type import IoPortType as IoPortType
|
|
45
|
-
from ..dto.ascii.lockstep_axes import LockstepAxes as LockstepAxes
|
|
46
45
|
from ..dto.ascii.measurement_sequence import MeasurementSequence as MeasurementSequence
|
|
47
46
|
from ..dto.ascii.message_type import MessageType as MessageType
|
|
48
47
|
from ..dto.ascii.optional_measurement_sequence import OptionalMeasurementSequence as OptionalMeasurementSequence
|
zaber_motion/ascii/axis.py
CHANGED
|
@@ -15,6 +15,7 @@ from ..dto.ascii.response import Response
|
|
|
15
15
|
from ..dto.measurement import Measurement
|
|
16
16
|
from ..dto.ascii.set_state_axis_response import SetStateAxisResponse
|
|
17
17
|
from ..dto.firmware_version import FirmwareVersion
|
|
18
|
+
from ..dto.unit_conversion_descriptor import UnitConversionDescriptor
|
|
18
19
|
|
|
19
20
|
if TYPE_CHECKING:
|
|
20
21
|
from .device import Device
|
|
@@ -1182,6 +1183,34 @@ class Axis:
|
|
|
1182
1183
|
dto.StringResponse.from_binary)
|
|
1183
1184
|
return response.value
|
|
1184
1185
|
|
|
1186
|
+
def get_command_unit_conversion_descriptors(
|
|
1187
|
+
self,
|
|
1188
|
+
command_template: str
|
|
1189
|
+
) -> List[Optional[UnitConversionDescriptor]]:
|
|
1190
|
+
"""
|
|
1191
|
+
Retrieves unit conversion descriptors for a command, allowing unit conversion without a device.
|
|
1192
|
+
The descriptors can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
1193
|
+
Parameters in the command template are denoted by a question mark.
|
|
1194
|
+
For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
1195
|
+
|
|
1196
|
+
Args:
|
|
1197
|
+
command_template: Template of the command. Parameters are denoted by question marks.
|
|
1198
|
+
|
|
1199
|
+
Returns:
|
|
1200
|
+
Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.
|
|
1201
|
+
"""
|
|
1202
|
+
request = dto.PrepareCommandRequest(
|
|
1203
|
+
interface_id=self.device.connection.interface_id,
|
|
1204
|
+
device=self.device.device_address,
|
|
1205
|
+
axis=self.axis_number,
|
|
1206
|
+
command_template=command_template,
|
|
1207
|
+
)
|
|
1208
|
+
response = call_sync(
|
|
1209
|
+
"device/get_command_unit_conversion",
|
|
1210
|
+
request,
|
|
1211
|
+
dto.GetCommandUnitConversionResponse.from_binary)
|
|
1212
|
+
return response.value
|
|
1213
|
+
|
|
1185
1214
|
def set_label(
|
|
1186
1215
|
self,
|
|
1187
1216
|
label: str
|
|
@@ -9,6 +9,7 @@ from ..units import UnitsAndLiterals, Units
|
|
|
9
9
|
from ..dto.ascii.conversion_factor import ConversionFactor
|
|
10
10
|
from ..dto.ascii.get_axis_setting import GetAxisSetting
|
|
11
11
|
from ..dto.ascii.get_axis_setting_result import GetAxisSettingResult
|
|
12
|
+
from ..dto.unit_conversion_descriptor import UnitConversionDescriptor
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
14
15
|
from .axis import Axis
|
|
@@ -609,6 +610,32 @@ class AxisSettings:
|
|
|
609
610
|
dto.BoolResponse.from_binary)
|
|
610
611
|
return response.value
|
|
611
612
|
|
|
613
|
+
def get_unit_conversion_descriptor(
|
|
614
|
+
self,
|
|
615
|
+
setting: str
|
|
616
|
+
) -> UnitConversionDescriptor:
|
|
617
|
+
"""
|
|
618
|
+
Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device.
|
|
619
|
+
The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
620
|
+
|
|
621
|
+
Args:
|
|
622
|
+
setting: Name of the setting.
|
|
623
|
+
|
|
624
|
+
Returns:
|
|
625
|
+
The unit conversion descriptor for the setting.
|
|
626
|
+
"""
|
|
627
|
+
request = dto.DeviceGetSettingRequest(
|
|
628
|
+
interface_id=self._axis.device.connection.interface_id,
|
|
629
|
+
device=self._axis.device.device_address,
|
|
630
|
+
axis=self._axis.axis_number,
|
|
631
|
+
setting=setting,
|
|
632
|
+
)
|
|
633
|
+
response = call_sync(
|
|
634
|
+
"device/get_setting_unit_conversion",
|
|
635
|
+
request,
|
|
636
|
+
UnitConversionDescriptor.from_binary)
|
|
637
|
+
return response
|
|
638
|
+
|
|
612
639
|
def set_custom_unit_conversions(
|
|
613
640
|
self,
|
|
614
641
|
conversions: List[ConversionFactor]
|
zaber_motion/ascii/device.py
CHANGED
|
@@ -22,6 +22,7 @@ from .streams import Streams
|
|
|
22
22
|
from ..dto.firmware_version import FirmwareVersion
|
|
23
23
|
from ..dto.measurement import Measurement
|
|
24
24
|
from ..dto.ascii.set_state_device_response import SetStateDeviceResponse
|
|
25
|
+
from ..dto.unit_conversion_descriptor import UnitConversionDescriptor
|
|
25
26
|
|
|
26
27
|
if TYPE_CHECKING:
|
|
27
28
|
from .connection import Connection
|
|
@@ -503,6 +504,33 @@ class Device:
|
|
|
503
504
|
dto.StringResponse.from_binary)
|
|
504
505
|
return response.value
|
|
505
506
|
|
|
507
|
+
def get_command_unit_conversion_descriptors(
|
|
508
|
+
self,
|
|
509
|
+
command_template: str
|
|
510
|
+
) -> List[Optional[UnitConversionDescriptor]]:
|
|
511
|
+
"""
|
|
512
|
+
Retrieves unit conversion descriptors for a command, allowing unit conversion without a device.
|
|
513
|
+
The descriptors can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
514
|
+
Parameters in the command template are denoted by a question mark.
|
|
515
|
+
For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
516
|
+
|
|
517
|
+
Args:
|
|
518
|
+
command_template: Template of the command. Parameters are denoted by question marks.
|
|
519
|
+
|
|
520
|
+
Returns:
|
|
521
|
+
Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.
|
|
522
|
+
"""
|
|
523
|
+
request = dto.PrepareCommandRequest(
|
|
524
|
+
interface_id=self.connection.interface_id,
|
|
525
|
+
device=self.device_address,
|
|
526
|
+
command_template=command_template,
|
|
527
|
+
)
|
|
528
|
+
response = call_sync(
|
|
529
|
+
"device/get_command_unit_conversion",
|
|
530
|
+
request,
|
|
531
|
+
dto.GetCommandUnitConversionResponse.from_binary)
|
|
532
|
+
return response.value
|
|
533
|
+
|
|
506
534
|
def set_label(
|
|
507
535
|
self,
|
|
508
536
|
label: str
|
|
@@ -9,6 +9,7 @@ from ..units import UnitsAndLiterals, Units
|
|
|
9
9
|
|
|
10
10
|
from ..dto.ascii.get_setting import GetSetting
|
|
11
11
|
from ..dto.ascii.get_setting_result import GetSettingResult
|
|
12
|
+
from ..dto.unit_conversion_descriptor import UnitConversionDescriptor
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
14
15
|
from .device import Device
|
|
@@ -586,6 +587,31 @@ class DeviceSettings:
|
|
|
586
587
|
dto.BoolResponse.from_binary)
|
|
587
588
|
return response.value
|
|
588
589
|
|
|
590
|
+
def get_unit_conversion_descriptor(
|
|
591
|
+
self,
|
|
592
|
+
setting: str
|
|
593
|
+
) -> UnitConversionDescriptor:
|
|
594
|
+
"""
|
|
595
|
+
Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device.
|
|
596
|
+
The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
597
|
+
|
|
598
|
+
Args:
|
|
599
|
+
setting: Name of the setting.
|
|
600
|
+
|
|
601
|
+
Returns:
|
|
602
|
+
The unit conversion descriptor for the setting.
|
|
603
|
+
"""
|
|
604
|
+
request = dto.DeviceGetSettingRequest(
|
|
605
|
+
interface_id=self._device.connection.interface_id,
|
|
606
|
+
device=self._device.device_address,
|
|
607
|
+
setting=setting,
|
|
608
|
+
)
|
|
609
|
+
response = call_sync(
|
|
610
|
+
"device/get_setting_unit_conversion",
|
|
611
|
+
request,
|
|
612
|
+
UnitConversionDescriptor.from_binary)
|
|
613
|
+
return response
|
|
614
|
+
|
|
589
615
|
def get_from_all_axes(
|
|
590
616
|
self,
|
|
591
617
|
setting: str
|
zaber_motion/ascii/lockstep.py
CHANGED
|
@@ -4,7 +4,6 @@ from typing import TYPE_CHECKING, List
|
|
|
4
4
|
from ..dto import requests as dto
|
|
5
5
|
from ..units import Units, LengthUnits, VelocityUnits, AccelerationUnits, TimeUnits
|
|
6
6
|
from ..call import call, call_async, call_sync
|
|
7
|
-
from ..dto.ascii.lockstep_axes import LockstepAxes
|
|
8
7
|
|
|
9
8
|
if TYPE_CHECKING:
|
|
10
9
|
from .device import Device
|
|
@@ -735,50 +734,6 @@ class Lockstep:
|
|
|
735
734
|
dto.BoolResponse.from_binary)
|
|
736
735
|
return response.value
|
|
737
736
|
|
|
738
|
-
def get_axes(
|
|
739
|
-
self
|
|
740
|
-
) -> LockstepAxes:
|
|
741
|
-
"""
|
|
742
|
-
Deprecated: Use GetAxisNumbers instead.
|
|
743
|
-
|
|
744
|
-
Gets the axes of the lockstep group.
|
|
745
|
-
|
|
746
|
-
Returns:
|
|
747
|
-
LockstepAxes instance which contains the axes numbers of the lockstep group.
|
|
748
|
-
"""
|
|
749
|
-
request = dto.LockstepEmptyRequest(
|
|
750
|
-
interface_id=self.device.connection.interface_id,
|
|
751
|
-
device=self.device.device_address,
|
|
752
|
-
lockstep_group_id=self.lockstep_group_id,
|
|
753
|
-
)
|
|
754
|
-
response = call(
|
|
755
|
-
"device/lockstep_get_axes",
|
|
756
|
-
request,
|
|
757
|
-
LockstepAxes.from_binary)
|
|
758
|
-
return response
|
|
759
|
-
|
|
760
|
-
async def get_axes_async(
|
|
761
|
-
self
|
|
762
|
-
) -> LockstepAxes:
|
|
763
|
-
"""
|
|
764
|
-
Deprecated: Use GetAxisNumbers instead.
|
|
765
|
-
|
|
766
|
-
Gets the axes of the lockstep group.
|
|
767
|
-
|
|
768
|
-
Returns:
|
|
769
|
-
LockstepAxes instance which contains the axes numbers of the lockstep group.
|
|
770
|
-
"""
|
|
771
|
-
request = dto.LockstepEmptyRequest(
|
|
772
|
-
interface_id=self.device.connection.interface_id,
|
|
773
|
-
device=self.device.device_address,
|
|
774
|
-
lockstep_group_id=self.lockstep_group_id,
|
|
775
|
-
)
|
|
776
|
-
response = await call_async(
|
|
777
|
-
"device/lockstep_get_axes",
|
|
778
|
-
request,
|
|
779
|
-
LockstepAxes.from_binary)
|
|
780
|
-
return response
|
|
781
|
-
|
|
782
737
|
def get_axis_numbers(
|
|
783
738
|
self
|
|
784
739
|
) -> List[int]:
|
|
@@ -15,7 +15,6 @@ from ..dto.ascii.measurement_sequence import MeasurementSequence
|
|
|
15
15
|
from ..dto.ascii.optional_measurement_sequence import OptionalMeasurementSequence
|
|
16
16
|
|
|
17
17
|
from .pvt_io import PvtIo
|
|
18
|
-
from ..dto.ascii.digital_output_action import DigitalOutputAction
|
|
19
18
|
|
|
20
19
|
if TYPE_CHECKING:
|
|
21
20
|
from .device import Device
|
|
@@ -1348,183 +1347,3 @@ class PvtSequence:
|
|
|
1348
1347
|
sequence_data=sequence_data,
|
|
1349
1348
|
)
|
|
1350
1349
|
await call_async("device/stream_pvt_submit_data", request)
|
|
1351
|
-
|
|
1352
|
-
def set_digital_output(
|
|
1353
|
-
self,
|
|
1354
|
-
channel_number: int,
|
|
1355
|
-
value: DigitalOutputAction
|
|
1356
|
-
) -> None:
|
|
1357
|
-
"""
|
|
1358
|
-
Deprecated: Use PvtSequence.Io.SetDigitalOutput instead.
|
|
1359
|
-
|
|
1360
|
-
Sets value for the specified digital output channel.
|
|
1361
|
-
|
|
1362
|
-
Args:
|
|
1363
|
-
channel_number: Channel number starting at 1.
|
|
1364
|
-
value: The type of action to perform on the channel.
|
|
1365
|
-
"""
|
|
1366
|
-
request = dto.StreamSetDigitalOutputRequest(
|
|
1367
|
-
interface_id=self.device.connection.interface_id,
|
|
1368
|
-
device=self.device.device_address,
|
|
1369
|
-
stream_id=self.pvt_id,
|
|
1370
|
-
pvt=True,
|
|
1371
|
-
channel_number=channel_number,
|
|
1372
|
-
value=value,
|
|
1373
|
-
)
|
|
1374
|
-
call("device/stream_set_digital_output", request)
|
|
1375
|
-
|
|
1376
|
-
async def set_digital_output_async(
|
|
1377
|
-
self,
|
|
1378
|
-
channel_number: int,
|
|
1379
|
-
value: DigitalOutputAction
|
|
1380
|
-
) -> None:
|
|
1381
|
-
"""
|
|
1382
|
-
Deprecated: Use PvtSequence.Io.SetDigitalOutput instead.
|
|
1383
|
-
|
|
1384
|
-
Sets value for the specified digital output channel.
|
|
1385
|
-
|
|
1386
|
-
Args:
|
|
1387
|
-
channel_number: Channel number starting at 1.
|
|
1388
|
-
value: The type of action to perform on the channel.
|
|
1389
|
-
"""
|
|
1390
|
-
request = dto.StreamSetDigitalOutputRequest(
|
|
1391
|
-
interface_id=self.device.connection.interface_id,
|
|
1392
|
-
device=self.device.device_address,
|
|
1393
|
-
stream_id=self.pvt_id,
|
|
1394
|
-
pvt=True,
|
|
1395
|
-
channel_number=channel_number,
|
|
1396
|
-
value=value,
|
|
1397
|
-
)
|
|
1398
|
-
await call_async("device/stream_set_digital_output", request)
|
|
1399
|
-
|
|
1400
|
-
def set_all_digital_outputs(
|
|
1401
|
-
self,
|
|
1402
|
-
values: List[DigitalOutputAction]
|
|
1403
|
-
) -> None:
|
|
1404
|
-
"""
|
|
1405
|
-
Deprecated: Use PvtSequence.Io.SetAllDigitalOutputs instead.
|
|
1406
|
-
|
|
1407
|
-
Sets values for all digital output channels.
|
|
1408
|
-
|
|
1409
|
-
Args:
|
|
1410
|
-
values: The type of action to perform on the channel.
|
|
1411
|
-
"""
|
|
1412
|
-
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
1413
|
-
interface_id=self.device.connection.interface_id,
|
|
1414
|
-
device=self.device.device_address,
|
|
1415
|
-
stream_id=self.pvt_id,
|
|
1416
|
-
pvt=True,
|
|
1417
|
-
values=values,
|
|
1418
|
-
)
|
|
1419
|
-
call("device/stream_set_all_digital_outputs", request)
|
|
1420
|
-
|
|
1421
|
-
async def set_all_digital_outputs_async(
|
|
1422
|
-
self,
|
|
1423
|
-
values: List[DigitalOutputAction]
|
|
1424
|
-
) -> None:
|
|
1425
|
-
"""
|
|
1426
|
-
Deprecated: Use PvtSequence.Io.SetAllDigitalOutputs instead.
|
|
1427
|
-
|
|
1428
|
-
Sets values for all digital output channels.
|
|
1429
|
-
|
|
1430
|
-
Args:
|
|
1431
|
-
values: The type of action to perform on the channel.
|
|
1432
|
-
"""
|
|
1433
|
-
request = dto.StreamSetAllDigitalOutputsRequest(
|
|
1434
|
-
interface_id=self.device.connection.interface_id,
|
|
1435
|
-
device=self.device.device_address,
|
|
1436
|
-
stream_id=self.pvt_id,
|
|
1437
|
-
pvt=True,
|
|
1438
|
-
values=values,
|
|
1439
|
-
)
|
|
1440
|
-
await call_async("device/stream_set_all_digital_outputs", request)
|
|
1441
|
-
|
|
1442
|
-
def set_analog_output(
|
|
1443
|
-
self,
|
|
1444
|
-
channel_number: int,
|
|
1445
|
-
value: float
|
|
1446
|
-
) -> None:
|
|
1447
|
-
"""
|
|
1448
|
-
Deprecated: Use PvtSequence.Io.SetAnalogOutput instead.
|
|
1449
|
-
|
|
1450
|
-
Sets value for the specified analog output channel.
|
|
1451
|
-
|
|
1452
|
-
Args:
|
|
1453
|
-
channel_number: Channel number starting at 1.
|
|
1454
|
-
value: Value to set the output channel voltage to.
|
|
1455
|
-
"""
|
|
1456
|
-
request = dto.StreamSetAnalogOutputRequest(
|
|
1457
|
-
interface_id=self.device.connection.interface_id,
|
|
1458
|
-
device=self.device.device_address,
|
|
1459
|
-
stream_id=self.pvt_id,
|
|
1460
|
-
pvt=True,
|
|
1461
|
-
channel_number=channel_number,
|
|
1462
|
-
value=value,
|
|
1463
|
-
)
|
|
1464
|
-
call("device/stream_set_analog_output", request)
|
|
1465
|
-
|
|
1466
|
-
async def set_analog_output_async(
|
|
1467
|
-
self,
|
|
1468
|
-
channel_number: int,
|
|
1469
|
-
value: float
|
|
1470
|
-
) -> None:
|
|
1471
|
-
"""
|
|
1472
|
-
Deprecated: Use PvtSequence.Io.SetAnalogOutput instead.
|
|
1473
|
-
|
|
1474
|
-
Sets value for the specified analog output channel.
|
|
1475
|
-
|
|
1476
|
-
Args:
|
|
1477
|
-
channel_number: Channel number starting at 1.
|
|
1478
|
-
value: Value to set the output channel voltage to.
|
|
1479
|
-
"""
|
|
1480
|
-
request = dto.StreamSetAnalogOutputRequest(
|
|
1481
|
-
interface_id=self.device.connection.interface_id,
|
|
1482
|
-
device=self.device.device_address,
|
|
1483
|
-
stream_id=self.pvt_id,
|
|
1484
|
-
pvt=True,
|
|
1485
|
-
channel_number=channel_number,
|
|
1486
|
-
value=value,
|
|
1487
|
-
)
|
|
1488
|
-
await call_async("device/stream_set_analog_output", request)
|
|
1489
|
-
|
|
1490
|
-
def set_all_analog_outputs(
|
|
1491
|
-
self,
|
|
1492
|
-
values: List[float]
|
|
1493
|
-
) -> None:
|
|
1494
|
-
"""
|
|
1495
|
-
Deprecated: Use PvtSequence.Io.SetAllAnalogOutputs instead.
|
|
1496
|
-
|
|
1497
|
-
Sets values for all analog output channels.
|
|
1498
|
-
|
|
1499
|
-
Args:
|
|
1500
|
-
values: Voltage values to set the output channels to.
|
|
1501
|
-
"""
|
|
1502
|
-
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
1503
|
-
interface_id=self.device.connection.interface_id,
|
|
1504
|
-
device=self.device.device_address,
|
|
1505
|
-
stream_id=self.pvt_id,
|
|
1506
|
-
pvt=True,
|
|
1507
|
-
values=values,
|
|
1508
|
-
)
|
|
1509
|
-
call("device/stream_set_all_analog_outputs", request)
|
|
1510
|
-
|
|
1511
|
-
async def set_all_analog_outputs_async(
|
|
1512
|
-
self,
|
|
1513
|
-
values: List[float]
|
|
1514
|
-
) -> None:
|
|
1515
|
-
"""
|
|
1516
|
-
Deprecated: Use PvtSequence.Io.SetAllAnalogOutputs instead.
|
|
1517
|
-
|
|
1518
|
-
Sets values for all analog output channels.
|
|
1519
|
-
|
|
1520
|
-
Args:
|
|
1521
|
-
values: Voltage values to set the output channels to.
|
|
1522
|
-
"""
|
|
1523
|
-
request = dto.StreamSetAllAnalogOutputsRequest(
|
|
1524
|
-
interface_id=self.device.connection.interface_id,
|
|
1525
|
-
device=self.device.device_address,
|
|
1526
|
-
stream_id=self.pvt_id,
|
|
1527
|
-
pvt=True,
|
|
1528
|
-
values=values,
|
|
1529
|
-
)
|
|
1530
|
-
await call_async("device/stream_set_all_analog_outputs", request)
|
|
@@ -422,10 +422,10 @@ class ServoTuner:
|
|
|
422
422
|
self,
|
|
423
423
|
paramset: ServoTuningParamset,
|
|
424
424
|
tuning_params: List[ServoTuningParam],
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
load_inertia: float,
|
|
426
|
+
load_inertia_units: UnitsAndLiterals = Units.NATIVE,
|
|
427
|
+
carriage_inertia: Optional[float] = None,
|
|
428
|
+
carriage_inertia_units: UnitsAndLiterals = Units.NATIVE,
|
|
429
429
|
motor_inertia: Optional[float] = None,
|
|
430
430
|
motor_inertia_units: UnitsAndLiterals = Units.NATIVE
|
|
431
431
|
) -> None:
|
|
@@ -437,14 +437,14 @@ class ServoTuner:
|
|
|
437
437
|
tuning_params: The params used to tune this device.
|
|
438
438
|
To get what parameters are expected, call GetSimpleTuningParamList.
|
|
439
439
|
All values must be between 0 and 1.
|
|
440
|
-
|
|
441
|
-
Unless specified by the
|
|
440
|
+
load_inertia: The mass loaded on the stage, excluding the mass of the carriage itself.
|
|
441
|
+
Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices,
|
|
442
442
|
and kg⋅m² for rotary devices.
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
Unless specified by the
|
|
443
|
+
load_inertia_units: The units the load mass was supplied in.
|
|
444
|
+
carriage_inertia: The mass of the carriage itself. If not supplied, the product's default mass will be used.
|
|
445
|
+
Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,
|
|
446
446
|
and kg⋅m² for rotary devices.
|
|
447
|
-
|
|
447
|
+
carriage_inertia_units: The units the carriage mass was supplied in.
|
|
448
448
|
motor_inertia: The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,
|
|
449
449
|
this is in units of kg⋅m².
|
|
450
450
|
motor_inertia_units: The units the motor inertia was supplied in.
|
|
@@ -455,10 +455,10 @@ class ServoTuner:
|
|
|
455
455
|
axis=self.axis.axis_number,
|
|
456
456
|
paramset=paramset,
|
|
457
457
|
tuning_params=tuning_params,
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
load_inertia=load_inertia,
|
|
459
|
+
load_inertia_units=load_inertia_units,
|
|
460
|
+
carriage_inertia=carriage_inertia,
|
|
461
|
+
carriage_inertia_units=carriage_inertia_units,
|
|
462
462
|
motor_inertia=motor_inertia,
|
|
463
463
|
motor_inertia_units=motor_inertia_units,
|
|
464
464
|
)
|
|
@@ -468,10 +468,10 @@ class ServoTuner:
|
|
|
468
468
|
self,
|
|
469
469
|
paramset: ServoTuningParamset,
|
|
470
470
|
tuning_params: List[ServoTuningParam],
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
471
|
+
load_inertia: float,
|
|
472
|
+
load_inertia_units: UnitsAndLiterals = Units.NATIVE,
|
|
473
|
+
carriage_inertia: Optional[float] = None,
|
|
474
|
+
carriage_inertia_units: UnitsAndLiterals = Units.NATIVE,
|
|
475
475
|
motor_inertia: Optional[float] = None,
|
|
476
476
|
motor_inertia_units: UnitsAndLiterals = Units.NATIVE
|
|
477
477
|
) -> None:
|
|
@@ -483,14 +483,14 @@ class ServoTuner:
|
|
|
483
483
|
tuning_params: The params used to tune this device.
|
|
484
484
|
To get what parameters are expected, call GetSimpleTuningParamList.
|
|
485
485
|
All values must be between 0 and 1.
|
|
486
|
-
|
|
487
|
-
Unless specified by the
|
|
486
|
+
load_inertia: The mass loaded on the stage, excluding the mass of the carriage itself.
|
|
487
|
+
Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices,
|
|
488
488
|
and kg⋅m² for rotary devices.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
Unless specified by the
|
|
489
|
+
load_inertia_units: The units the load mass was supplied in.
|
|
490
|
+
carriage_inertia: The mass of the carriage itself. If not supplied, the product's default mass will be used.
|
|
491
|
+
Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,
|
|
492
492
|
and kg⋅m² for rotary devices.
|
|
493
|
-
|
|
493
|
+
carriage_inertia_units: The units the carriage mass was supplied in.
|
|
494
494
|
motor_inertia: The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,
|
|
495
495
|
this is in units of kg⋅m².
|
|
496
496
|
motor_inertia_units: The units the motor inertia was supplied in.
|
|
@@ -501,10 +501,10 @@ class ServoTuner:
|
|
|
501
501
|
axis=self.axis.axis_number,
|
|
502
502
|
paramset=paramset,
|
|
503
503
|
tuning_params=tuning_params,
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
load_inertia=load_inertia,
|
|
505
|
+
load_inertia_units=load_inertia_units,
|
|
506
|
+
carriage_inertia=carriage_inertia,
|
|
507
|
+
carriage_inertia_units=carriage_inertia_units,
|
|
508
508
|
motor_inertia=motor_inertia,
|
|
509
509
|
motor_inertia_units=motor_inertia_units,
|
|
510
510
|
)
|
|
@@ -559,79 +559,3 @@ class ServoTuner:
|
|
|
559
559
|
request,
|
|
560
560
|
SimpleTuning.from_binary)
|
|
561
561
|
return response
|
|
562
|
-
|
|
563
|
-
def is_using_simple_tuning(
|
|
564
|
-
self,
|
|
565
|
-
paramset: ServoTuningParamset,
|
|
566
|
-
tuning_params: List[ServoTuningParam],
|
|
567
|
-
load_mass: float,
|
|
568
|
-
carriage_mass: Optional[float] = None
|
|
569
|
-
) -> bool:
|
|
570
|
-
"""
|
|
571
|
-
Deprecated: Use GetSimpleTuning instead.
|
|
572
|
-
|
|
573
|
-
Checks if the provided simple tuning is being stored by this paramset.
|
|
574
|
-
|
|
575
|
-
Args:
|
|
576
|
-
paramset: The paramset to set tuning for.
|
|
577
|
-
tuning_params: The params used to tune this device.
|
|
578
|
-
To get what parameters are expected, call GetSimpleTuningParamList.
|
|
579
|
-
All values must be between 0 and 1.
|
|
580
|
-
load_mass: The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
|
|
581
|
-
carriage_mass: The mass of the carriage in kg. If this value is not set the default carriage mass is used.
|
|
582
|
-
|
|
583
|
-
Returns:
|
|
584
|
-
True if the provided simple tuning is currently stored in this paramset.
|
|
585
|
-
"""
|
|
586
|
-
request = dto.SetSimpleTuning(
|
|
587
|
-
interface_id=self.axis.device.connection.interface_id,
|
|
588
|
-
device=self.axis.device.device_address,
|
|
589
|
-
axis=self.axis.axis_number,
|
|
590
|
-
paramset=paramset,
|
|
591
|
-
tuning_params=tuning_params,
|
|
592
|
-
load_mass=load_mass,
|
|
593
|
-
carriage_mass=carriage_mass,
|
|
594
|
-
)
|
|
595
|
-
response = call(
|
|
596
|
-
"servotuning/is_using_simple_tuning",
|
|
597
|
-
request,
|
|
598
|
-
dto.BoolResponse.from_binary)
|
|
599
|
-
return response.value
|
|
600
|
-
|
|
601
|
-
async def is_using_simple_tuning_async(
|
|
602
|
-
self,
|
|
603
|
-
paramset: ServoTuningParamset,
|
|
604
|
-
tuning_params: List[ServoTuningParam],
|
|
605
|
-
load_mass: float,
|
|
606
|
-
carriage_mass: Optional[float] = None
|
|
607
|
-
) -> bool:
|
|
608
|
-
"""
|
|
609
|
-
Deprecated: Use GetSimpleTuning instead.
|
|
610
|
-
|
|
611
|
-
Checks if the provided simple tuning is being stored by this paramset.
|
|
612
|
-
|
|
613
|
-
Args:
|
|
614
|
-
paramset: The paramset to set tuning for.
|
|
615
|
-
tuning_params: The params used to tune this device.
|
|
616
|
-
To get what parameters are expected, call GetSimpleTuningParamList.
|
|
617
|
-
All values must be between 0 and 1.
|
|
618
|
-
load_mass: The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
|
|
619
|
-
carriage_mass: The mass of the carriage in kg. If this value is not set the default carriage mass is used.
|
|
620
|
-
|
|
621
|
-
Returns:
|
|
622
|
-
True if the provided simple tuning is currently stored in this paramset.
|
|
623
|
-
"""
|
|
624
|
-
request = dto.SetSimpleTuning(
|
|
625
|
-
interface_id=self.axis.device.connection.interface_id,
|
|
626
|
-
device=self.axis.device.device_address,
|
|
627
|
-
axis=self.axis.axis_number,
|
|
628
|
-
paramset=paramset,
|
|
629
|
-
tuning_params=tuning_params,
|
|
630
|
-
load_mass=load_mass,
|
|
631
|
-
carriage_mass=carriage_mass,
|
|
632
|
-
)
|
|
633
|
-
response = await call_async(
|
|
634
|
-
"servotuning/is_using_simple_tuning",
|
|
635
|
-
request,
|
|
636
|
-
dto.BoolResponse.from_binary)
|
|
637
|
-
return response.value
|