Hello Guest it is April 28, 2024, 04:01:03 PM

Author Topic: mysterious brain  (Read 5359 times)

0 Members and 1 Guest are viewing this topic.

mysterious brain
« on: January 30, 2008, 10:02:55 AM »
Hi,

can anyone explain this to me



Frank

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: mysterious brain
« Reply #1 on: January 30, 2008, 04:21:34 PM »
Given the title of this thread I was expecting it to be about Brian  ;), who indeed does have a mysterious brain. (Only putting in 100 hours a week, come on who needs sleep  ;D)

As for the actual question, it just looks like two ModBus registers that are inverted and then anded together to turn on 'Stop File'.
Happy machining , Jeff Birt
 
Re: mysterious brain
« Reply #2 on: January 30, 2008, 04:26:52 PM »
of course - but take a closer look:

both inputs are 0 - but one is inactive (upper) and one active (lower)

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: mysterious brain
« Reply #3 on: January 30, 2008, 04:45:38 PM »
Hmm....indeed, it seems the top inverter should be on (green) as well. What type of data is in these ModBus registers? Judgin by the value showing "0.0000" it is not a boolean type. Could the value in the register be smaller than 0.0000? Or perhaps it is beign read as a -0.0000. Yes it can happen, if the register is supposed to be a signed short and somehow gets the msb set you will have a negitive zero, which when cast to a boolean might be a 1. (I don't know how Brains handle type casting).
Happy machining , Jeff Birt
 
Re: mysterious brain
« Reply #4 on: January 30, 2008, 04:51:55 PM »
both inputs are boolean (switches on/off)

in Modbus CFG configured as coil input - but there no change when changing it.
Transfered from modbus device is just an input

and now the mostly mystery:
when acting P8 - nothing happens on the inverter (input value changed)
after releasing: nothing
when actin P9: BINGO - both green (after release)

but i'm testing on this feature - there must be a solution

Frank

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: mysterious brain
« Reply #5 on: January 30, 2008, 04:57:59 PM »
Try running both ModBus inputs stright through (no operation) to some UserLEDs (or something similar). See if each input value is transferred properly to the output. If so then the problem has to lie in how Brains are ANDing the two inputs. You could also try passing each input through a 'no operation' and then inverting them.
Happy machining , Jeff Birt
 

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: mysterious brain
« Reply #6 on: January 30, 2008, 06:36:41 PM »
here are a few things to try and check:

1). Bring in your inputs to a holding register not coil
2). Check both your PLC and Serial Modbus config make sure that your address range goes up high and low enough to pick up the bit off of your plc, and also the range in the config is high/low enough to catch it. If you are one address lower than what your trying to pick up then Garbage will be in that register and thus your bit will be undefined. You could be one starting address to high, than your lower Brian input address..........
3). I recreated your Brian here on my system, with the Serial Plug in and a ADC 06 PLC and it was no issues......

Scott
fun times