IP conections in modules
white
Posts: 7
I have problem with defining local port for ip connection, when this connection inside the module. If something like that:
DEFINE_DEVICE
vdvIPdev=0:FIRST_LOCAL_PORT+41:0
DEFINE_START
DEFINE_MODULE 'aaa' sdfds(vdvIPdev)
, i recive "ERROR: (0): C10580: Internal Error: Major system error occurred during code generation ".
but if i write
DEFINE_DEVICE
vdvIPdev=0:44:0
it is ok.
Why thirst variant gives this error?
DEFINE_DEVICE
vdvIPdev=0:FIRST_LOCAL_PORT+41:0
DEFINE_START
DEFINE_MODULE 'aaa' sdfds(vdvIPdev)
, i recive "ERROR: (0): C10580: Internal Error: Major system error occurred during code generation ".
but if i write
DEFINE_DEVICE
vdvIPdev=0:44:0
it is ok.
Why thirst variant gives this error?
0
Comments
As for the FIRST_LOCAL_PORT, I have stopped using it all together because of problems similar to what you describe. There is no advantage to using FIRST_LOCAL_PORT as it is just a constant value of 1 or 2 (don't recall which). It would be nice if, on load, the processor could assign a port to each IP device, but NetLinx just doesn't allow it. At least now I have the IR file assignment window that I can arrange by device so I can see if I declared unique ports for everything
Not sure if this helps or answers your question, but I suppose the old joke would work best here.... Guy walks into a doctor's office and says "Doc, it hurts when I pinch my arm. What should I do?". The doctor says "Stop pinching your arm!". (Just do it the second way )
Jeff
He isn't.
white, try putting your FIRST_LOCAL_PORT bit in parenthesis, forget using FIRST_LOCAL_PORT, or define it in a variable.
I define device outside of the module, but connection initiates inside module.
Now, I don't use FIRST_LOCAL_PORT, but I think what things like
DEFINE_DEVICE
dvIPDev=0:1+1:0
DEFINE_MODULE some_module 'module1' (dvIPDev)
must work in NetLinx compiler .