# Source\_in

![source\_in node in AXV\_datasource section](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LdgGNBKyB7rIfTWFfp1%2F-LdgIsuPlRq3y1ivQIV6%2Fsource_in.PNG?alt=media\&token=ec995dd9-6953-4443-87cd-16ff26bb26df)

## Introduction

This node allows you receive data form system or connected devices (such as Modbus sensors, PLC, etc.)

## System information

`source_in`allow you get DIO status, General information, HWM result and IO status from device `AXView`

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LetOZ70XF8cXdZNeuS0%2F-LetP_7A8NsHfsotVHZ_%2Fimage.png?alt=media\&token=f03f5c33-c258-49e4-b491-c074df985a19)

### DIO status

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LetIc_v74i-2zaOmyv8%2F-LetN20G6Zg4Iq44Xj3G%2Fimage.png?alt=media\&token=91e2b47e-4cf5-4d6b-9695-1730d404f148)

You can get the digital input/output status in your computer by choosing sensor DIO, also, it'll show the pin define of GPIO. (**1** means input, **0** means output)

{% hint style="info" %}
Copy below text and import to Flow Design then see what happened.
{% endhint %}

```
[{"id":"4896d0cf.9719c","type":"source_in","z":"6b0f01f6.66298","device":"AXView - AXView","sensor":"DIO - DIO","x":170,"y":80,"wires":[["f33a6bb6.06a628"]]},{"id":"f33a6bb6.06a628","type":"debug","z":"6b0f01f6.66298","name":"","active":true,"console":"false","complete":"false","x":370,"y":80,"wires":[]}]
```

### General Information

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LetIc_v74i-2zaOmyv8%2F-LetNP6KV6uxpC3rr1-X%2Fimage.png?alt=media\&token=b96b26a0-db1c-4016-b089-0686469988ea)

General Information shows the device's basic information, such as BIOS version, CPU module type, OS version and memory usage.

{% hint style="info" %}
Copy below text and import to Flow Design then see what happened.
{% endhint %}

```
[{"id":"79660328.8bf80c","type":"source_in","z":"6b0f01f6.66298","device":"AXView - AXView","sensor":"General - General","x":180,"y":180,"wires":[["e3ae8d09.486a7"]]},{"id":"e3ae8d09.486a7","type":"debug","z":"6b0f01f6.66298","name":"","active":true,"console":"false","complete":"false","x":370,"y":180,"wires":[]}]
```

### HWM result

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LetIc_v74i-2zaOmyv8%2F-LetO8BULVsAZkpz_G9j%2Fimage.png?alt=media\&token=240cf8e0-f405-483d-a8bc-36c1e3d1cb3f)

Hardware monitor result shows the CPU temperature and system voltage.

{% hint style="info" %}
Copy below text and import to Flow Design then see what happened.
{% endhint %}

```
[{"id":"85666e3f.d7f41","type":"source_in","z":"6b0f01f6.66298","device":"AXView - AXView","sensor":"HWM - HWM","x":170,"y":300,"wires":[["3502e0a8.5f5ec"]]},{"id":"3502e0a8.5f5ec","type":"debug","z":"6b0f01f6.66298","name":"","active":true,"console":"false","complete":"false","x":370,"y":300,"wires":[]}]
```

### IO status

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LetIc_v74i-2zaOmyv8%2F-LetNuvawdFZ1UbACxS3%2Fimage.png?alt=media\&token=d11f3a6c-aa4c-47cc-ab8a-603663435321)

IO status shows the interface status of computer, including Product ID , Vendor ID and Manufacturer.

{% hint style="info" %}
Copy below text and import to Flow Design then see what happened.
{% endhint %}

```
[{"id":"dea3bedd.b02d3","type":"source_in","z":"6b0f01f6.66298","device":"AXView - AXView","sensor":"IO - IO","x":160,"y":400,"wires":[["3b4463a2.8f4c0c"]]},{"id":"3b4463a2.8f4c0c","type":"debug","z":"6b0f01f6.66298","name":"","active":true,"console":"false","complete":"false","x":370,"y":400,"wires":[]}]
```

## Receiving Modbus devices data

After create a device and setup the parameters of Modbus, AXView 3.0 will start auto polling, so you can get data of Modbus device by using `source_in` node, too.

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LeuE3q_yoMODC5WgnZC%2F-LeuG6o8Sh5J15-bqdOA%2Fimage.png?alt=media\&token=ac6be38d-7ef6-44a7-a865-34fd0ebd7612)

If you connect the `source_in`to `debug` node, it will shows the result of polling. By default, the data format are always hexadecimal in string, if you want to know the result of decimal, you have to transform it by using `function`node.

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LeuE3q_yoMODC5WgnZC%2F-LeuJ-1llDimHAP-J6oT%2Fimage.png?alt=media\&token=03ada027-5a9c-4adc-a003-3ac4fee9fd38)

The code in the `function` node "Hex to Dec":

```javascript
msg.payload = parseInt(msg.payload, 16);
return msg;
```

![](https://2909878411-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc00kv6JMggJXSZbUet%2F-LeuE3q_yoMODC5WgnZC%2F-LeuItmQu8MMocrNIAQu%2Fimage.png?alt=media\&token=a5749f8a-00f4-4780-80d1-dd451174f6a4)

After transformation process, you'll get a decimal in number result.
