Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Robotics Nodes - nodes PR:313 #415

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

[//]: # (Custom component imports)

import DocString from '@site/src/components/DocString';
import PythonCode from '@site/src/components/PythonCode';
import AppDisplay from '@site/src/components/AppDisplay';
import SectionBreak from '@site/src/components/SectionBreak';
import AppendixSection from '@site/src/components/AppendixSection';

[//]: # (Docstring)

import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt';
import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt';

<DocString>{DocstringSource}</DocString>
<PythonCode GLink='IO/INSTRUMENTS/MULTIMETERS/NI/USB_4065/BASIC/AC_CURRENT_USB4065/AC_CURRENT_USB4065.py'>{PythonSource}</PythonCode>

<SectionBreak />



[//]: # (Examples)

## Examples

import Example1 from './examples/EX1/example.md';
import App1 from '!!raw-loader!./examples/EX1/app.json';



<AppDisplay
nodeLabel='AC_CURRENT_USB4065'
appImg={''}
outputImg={''}
>
{App1}
</AppDisplay>

<Example1 />

<SectionBreak />



[//]: # (Appendix)

import Notes from './appendix/notes.md';
import Hardware from './appendix/hardware.md';
import Media from './appendix/media.md';

## Appendix

<AppendixSection index={0} folderPath='nodes/IO/INSTRUMENTS/MULTIMETERS/NI/USB_4065/BASIC/AC_CURRENT_USB4065/appendix/'><Notes /></AppendixSection>
<AppendixSection index={1} folderPath='nodes/IO/INSTRUMENTS/MULTIMETERS/NI/USB_4065/BASIC/AC_CURRENT_USB4065/appendix/'><Hardware /></AppendixSection>
<AppendixSection index={2} folderPath='nodes/IO/INSTRUMENTS/MULTIMETERS/NI/USB_4065/BASIC/AC_CURRENT_USB4065/appendix/'><Media /></AppendixSection>


Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
The AC_CURRENT_USB4065 node reads the AC current from a USB-4065.

The USB-4065 is a NI (National Instruments) multimeter. It is possible that
the node will work with other NI DMMs (digital multimeters) such as the
4070 and 4080 series.

This instrument will likely only be compatible with Windows systems due to
NI driver availablity. To use the instrument you must install the runtime:

https://www.ni.com/en/support/downloads/drivers/download.ni-dmm.html

You must also find the address/resource name for the instrument. You can
find this using the NI MAX programming which can be downloaded when
installing the drivers.

Parameters
----------
NI_address: str
The NI instrument address for the instrument (e.g. 'Dev0', 'Dev1').
digits: str
The accuracy of the reading in digits. Lower values are faster.
current_limit: str
The maximum current to allow, in Amps.

Returns
-------
DataContainer
Scalar: The AC current reading.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from flojoy import flojoy, DataContainer, Scalar
from flojoy.connection_manager import DeviceConnectionManager
from typing import Optional, Literal
import nidmm


@flojoy(deps={"nidmm": "1.4.6"})
def AC_CURRENT_USB4065(
NI_address: str = "Dev1",
digits: Literal["4.5", "5.5", "6.5"] = "5.5",
current_limit: Literal["0.01", "0.1", "0.5", "3"] = "3",
default: Optional[DataContainer] = None,
) -> Scalar:


connection = DeviceConnectionManager.get_connection(NI_address)
session = connection.get_handle()

session.configure_measurement_digits(
nidmm.Function.AC_CURRENT,
range=float(current_limit),
resolution_digits=float(digits),
)

reading = session.read()

return Scalar(c=reading)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No supporting screenshots, photos, or videos have been added to the media.md file for this node.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No theory or technical notes have been contributed for this node yet.
Loading