[GitHub] [plc4x] hutcheb opened a new pull request, #358: Plc4py/plc field

2022-04-22 Thread GitBox
hutcheb opened a new pull request, #358: URL: https://github.com/apache/plc4x/pull/358 Started to update the PlcField and look at how to handle async functions. Common problem I've found with using the Future class is there's no way to specify a timeout. This can cause issues with the

[GitHub] [plc4x] hutcheb closed pull request #354: Fix/plc4py_pipenv

2022-04-22 Thread GitBox
hutcheb closed pull request #354: Fix/plc4py_pipenv URL: https://github.com/apache/plc4x/pull/354 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-un

[GitHub] [plc4x] hutcheb commented on pull request #354: Fix/plc4py_pipenv

2022-04-22 Thread GitBox
hutcheb commented on PR #354: URL: https://github.com/apache/plc4x/pull/354#issuecomment-1106816845 Using pipenv to build is too slow and adds an unnecessary dependency. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use

[GitHub] [plc4x] hutcheb merged pull request #355: Fix/plc4py venv

2022-04-22 Thread GitBox
hutcheb merged PR #355: URL: https://github.com/apache/plc4x/pull/355 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@plc4x.apache.org

Re: [DISCUSS] how to read bool and bool-arrays?

2022-04-22 Thread Łukasz Dywicki
Hello Chris, Myhongk, Stephen, I would say.. watch how others do it.. openHAB modbus binding for example has an additional parameter of "offset", so you can read status bit and ie. float value on remaining 15 or 31 bits separately. While I haven't seen such strange encoding of floats (but I saw

RE: [DISCUSS] how to read bool and bool-arrays?

2022-04-22 Thread Christofer Dutz
Hi Stephen, Well, it sort of touches that area ... generally big endian/little endian handles the byte order ... so this would more have an effect on the order of the bytes inside the register too. In general I would love to handle BE/LE as an option on the connection string. So per default it'

Re: Reads of type bool have different results

2022-04-22 Thread 洪锦琳
Okay, thank you Christofer Dutz 於 2022年4月22日 週五 下午6:12寫道: > Hi Myhongk, > > Well, you're never alone and we're always there to help you. So no > worries, you're not going to break anything. > > Right now initially it was the plan to read the 10 least significant bit's > of the register in that c

Re: [DISCUSS] how to read bool and bool-arrays?

2022-04-22 Thread Stephen Snow
Hi Chris and Myhongk, et al Depending on the processor (this would include embedded IIOT devices) they could be big or little endian, which may complicate matters for the modbus driver. Being able to set this as a parameter when using the driver in an app being built which may talk to many modbus

[DISCUSS] how to read bool and bool-arrays?

2022-04-22 Thread Christofer Dutz
Hi all, Myhongk just brought up an issue in the Modbus driver, which I think could probably also come up in other protocols. When reading a BOOL or BOOL[] the driver generally reads chunks of 16 bits (words). Now we need to define how we count the bits. Currently when reading a simple BOOL we

RE: Reads of type bool have different results

2022-04-22 Thread Christofer Dutz
Hi Myhongk, Well, you're never alone and we're always there to help you. So no worries, you're not going to break anything. Right now initially it was the plan to read the 10 least significant bit's of the register in that case, but from the code it's reading the most significant ones (Which I

Re: Reads of type bool have different results

2022-04-22 Thread jl hong
Thanks for the reply, Chris. 1 Myhongk is ok, haha 2 It is my honor to be a regular contributor to open source projects.I'm just worried if I'm up to the task. 3 Thanks for the detailed answer on BOOL type, I will try to fix this bug. Let me confirm, 46:BOOL[10], it means read the last 1-10 bit

[BUILD-STABLE]: Job 'PLC4X/PLC4X/develop [develop] [873]'

2022-04-22 Thread Apache Jenkins Server
BUILD-STABLE: Job 'PLC4X/PLC4X/develop [develop] [873]': Is back to normal.

RE: Reads of type bool have different results

2022-04-22 Thread Christofer Dutz
Hi Myhong (Hope that's correct) First of all, welcome to our cool project ... I hope you'll like it here and become a regular contributor ;-) Regarding BOOL[2] getting the last two bits of two registers is definitely not the way it should be. It should be returning the last two bits of one regi

Re: Reads of type bool have different results

2022-04-22 Thread 洪锦琳
Sorry, for the title. My first email was sent back because it was over the word count (because I added a screenshot), and I was in a hurry to send a second email, so I forgot to change the title, so sorry about that! Original email title: [plc4go][issue]Reads of type bool have different results 洪锦

Reads of type bool have different results

2022-04-22 Thread 洪锦琳
Hello everyone! First, thanks to Chris for his reply in my PR, so here I am! Issue: 1 When I read 46:BOOL[1], it will get the last bit of 46(2bytes). Here is the source code: github.com/apache/plc4x/plc4go/internal/plc4go/modbus/readwrite/model/DataItem.go case dataType == ModbusDataType_