S7 TCP driver – switch connections

S7 TCP driver – switch connections

  • 30 gennaio 2013 alle 2:46 pm #20936
    chy
    Membro

    Hi all,

    is there any possibility how to change ip adress of the connected server from terminal(WIN CE)? (Exactly this IP: Real time DB -> comm.drivers -> S7 TCP ->Stations -> Default station -> Server adress)  

    I have terminal which is supposed to be used in different networks. So idea is that i connect with terminal and pick appropriate IP adress.

    thank you for answers

    Lukas

  • 4 febbraio 2013 alle 4:22 pm #20937
    NRobin
    Membro

    Hi Lukas, if you need to modify the Server Address before execute the project, you can do it by opening the file ‘YourProjectFolder/RESOURCES/YourProjectName/S7 TCP.drvsettings’ with the NotePad or a Text Editor.

    Bye,
    Nico 😉

  • 6 febbraio 2013 alle 9:59 am #20938
    chy
    Membro

    Hi,

    i need to switch connection by user – that means from Terminal. would it be possible to do it by running script?

    Thanks
    Lukas

  • 19 febbraio 2013 alle 3:09 pm #20939
    Ian_C
    Membro

    Hi Chy,

    a possible way to do that, could be using in the Station properties a backup IP address; in this way, using also a State/Command variable, you could select with which IP address the Station have to communicate.

    Regards

  • 22 febbraio 2013 alle 1:49 pm #20940
    chy
    Membro

    Hi,

    however I need more than two ip adresses – the best would be to have for example 8 buttons – each have ‘On click’ function, which will change connection ip adress.

    (I know there is way with conditional tags, but than I would need ‘Number of tags’ x ‘Number of connections’ = ‘total tasks’)

    Lukas

  • 25 febbraio 2013 alle 12:05 pm #20941
    Ian_C
    Membro

    Hi Lukas,

    ok, in this case you have to switch on the backup Address (with the conditional variable), change from Basic Script the Server Address Property(see Functions and properties of TCPIPStationInterface), then re-switch on the primary Address.

    Good work!
    Regards

  • 25 febbraio 2013 alle 1:02 pm #20942
    chy
    Membro

    Hi,

    I’m sorry, I still don’t know how to do it. Primary server address is at ‘Station properties’, but it’s fixed value.
     In basic script, I should use something like ‘SetVariableValue’..? I’ve searched through help, but didn’t find anything relevant. 

    thank you

  • 25 febbraio 2013 alle 2:14 pm #20943
    Ian_C
    Membro

    Hi Lukas,

    maybe it is the wrong Help! Try to have a look on the GenericDriver.chm in the installation folder of Movicon and search TCPIPStationInterface (or precisely ServerAddress): there you can see how to change Runtime your static Server Address!

    Regards 

  • 25 febbraio 2013 alle 5:13 pm #20944
    chy
    Membro

    Yes, much better now 🙂 One more thing.

    ‘To make programming easier you can enable the interested Driver Reference within the basic script
    routine to declare the specific necessary object types (ie. DriverInterface, TaskInterface, etc.) and
    not generic types (Object). This will give you a list of methods and properties of each specific object
    you declare.’

    ‘Please keep in mind that the Reference enabling is not supported on the WinCE platform. If you have
    to develop a project which has to be executed on WinCE, the References mustn’t be enabled but you
    must declare all Object types.’

    To make it compatible with the WinCE platform the driver References must be enabled and the
    variables should be declared as follows….

    This is written in help on one page – what is correct – references enabled/disabled? I use WinCE.  Thank you.

Devi essere loggato per rispondere a questa discussione.