mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2026-08-18 02:37:40 +08:00
Add files via upload
Fixed %MW0 access
This commit is contained in:
@@ -138,7 +138,7 @@ void mapUnusedIO()
|
||||
|
||||
for (int i = 0; i <= MAX_16B_RANGE; i++)
|
||||
{
|
||||
if (i < MIN_16B_RANGE)
|
||||
if (i < MIN_16B_RANGE)
|
||||
{
|
||||
if (int_output[i] == NULL)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ void ReadHoldingRegisters(unsigned char *buffer, int bufferSize)
|
||||
for(int i = 0; i < WordDataLength; i++)
|
||||
{
|
||||
int position = Start + i;
|
||||
if (position <= MIN_16B_RANGE)
|
||||
if (position < MIN_16B_RANGE)
|
||||
{
|
||||
if (int_output[position] != NULL)
|
||||
{
|
||||
@@ -575,7 +575,7 @@ void WriteCoil(unsigned char *buffer, int bufferSize)
|
||||
int writeToRegisterWithoutLocking(int position, uint16_t value)
|
||||
{
|
||||
//analog outputs
|
||||
if (position <= MIN_16B_RANGE)
|
||||
if (position < MIN_16B_RANGE)
|
||||
{
|
||||
if (int_output[position] != NULL) *int_output[position] = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user