SET_VIRTUAL_PORT_COUNT ??
KielL
Posts: 34
Hello everyone,
I just inherited a program that might have a potential bug lurking in it somewhere. As I've been going over it, I found in the DEFINE_EVENT section of the main program:
I've never used SET_VIRTUAL_PORT_COUNT, and it isn't in the NetLinx documentation either it seems. I'm guessing by the name that it sets a port count for a virtual device, but I'm wondering why that is even needed really. Has anybody else ever used this function? Is there any benefit?
Many thanks for the help!
I just inherited a program that might have a potential bug lurking in it somewhere. As I've been going over it, I found in the DEFINE_EVENT section of the main program:
data_event[33001:1:0] { online: { set_virtual_port_count(data.device,15) } }
I've never used SET_VIRTUAL_PORT_COUNT, and it isn't in the NetLinx documentation either it seems. I'm guessing by the name that it sets a port count for a virtual device, but I'm wondering why that is even needed really. Has anybody else ever used this function? Is there any benefit?
Many thanks for the help!
0
Comments
I'm confused as to why one would set it to 15 when 256 it should work out of the box.
Thank you for the help, jjames!
Here is the section the NetLinx Keywords Help file:
As you can see, there is also a SET_VIRTUAL_CHANNEL_COUNT and SET_VIRTUAL_LEVEL_COUNT. Channels default to 255 and levels to 8. I would recommend NOT removing it unless you are sure you don't need it.
Jeff
*oops!*
I was going to say... It is not wise to remove code from a program on the grounds that you do not understand why it was there. Surfice it to say, programmers tend not to add code just to add code...
I never advised him to remove it.
Should there also be a REBUILD_EVENT() in there?