# Making array and reading single values

**URL:** https://discourse.nodered.org/t/making-array-and-reading-single-values/32391
**Category:** General
**Created:** [3 September 2020 09:32 UTC](https://discourse.nodered.org/t/making-array-and-reading-single-values/32391 "2020-09-03T09:32:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vishalk](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vishalk](https://discourse.nodered.org/u/vishalk)
#### Post date: [3 September 2020 09:32 UTC](https://discourse.nodered.org/t/making-array-and-reading-single-values/32391/1 "2020-09-03T09:32:28Z")

</div>

![read](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7df3a55d589bdb2e5b1df1ea6d7fad040188ce46.png)

Hello,

I am little new to node red.I dont know javascript  
I want to read 8 bits from PLC and the for each single bit status is to be shown on LED display.  
But I dont know how to do it. picture shows the exmaple how its to be formed

Please tell what function should I write to store all bits in a array and then read each bits

Thanking you  
Vishal

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [3 September 2020 10:34 UTC](https://discourse.nodered.org/t/making-array-and-reading-single-values/32391/2 "2020-09-03T10:34:19Z")

</div>

Add a debug node showing us what you are getting from the OPC node and tell us what you want the LEDs to show for that data.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [2 November 2020 10:34 UTC](https://discourse.nodered.org/t/making-array-and-reading-single-values/32391/3 "2020-11-02T10:34:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
