Produkte » Produkte
Beispiel-Scripts
Kategorie: Bus Specific
| CO_V30_IC_example_16RxPDO_16TxPDO | |
|---|---|
The CAN firmware allows the definition of user objects and the mapping of up to 16 Rx and 16 Tx PDOs from script revision 25 and higher. For script revisions between 22 and 25 you may only use up to 5 Rx and 5Tx PDO's.
|
| example_CAN_Layer_2 | |
|---|---|
If you like to use CAN Layer 2 we provide a mechanism to access every CAN Message without any Filter. Please note that in this case the data format for ReadBus and Write bus differs from other functionality. From now on we have The COB-ID of the message to be read or send in the first 2 bytes of the data area.
|
| Example_CO_V4 | |
|---|---|
Every Script MUST have the following ObjectTable, and length MUST be:
((number of objects) + 2) * 12
If length is not correct, there will be big problems by running the script!
var a_ObjectTable : buffer[48]; (2 Objects + 2) * 12 = 48
This line MUST done befor CANopen-objects will be created
InitObjectTable ( 2 , a_ObjectTable[0] ) ; 2=number of objects
|
| example_FE_ModbusTCP | |
|---|---|
This script realized the Modbus-RTU-function described in UNIGATE Manual
|
| example_FE_WebServer | |
|---|---|
It is necessary to initialize the Fast Ethernet device with this command. A Fast Ethernet device is capable of having 4 IP-connections simultaneously; even a UDP is treated as a "connection".
In configmode you have a FTP-connection and a Telnet-connection.
With this FTP-connection you have the possibility to read and write the Script.
|
| example_InitFastEthernet | |
|---|---|
It is necessary to initialize the Fast Ethernet device with this command. A Fast Ethernet device is capable of having 4 IP-connections simultaneously; even a UDP is treated as a "connection".
In configmode you have a FTP-connection and a Telnet-connection.
With this FTP-connection you have the possibility to read and write the Script.
|
| example_LON | |
|---|---|
LON defines a number of SNVT In and SNVT Out variables. A variable is always seen from the LON device, this means an In-variable is received by a LON device.
It is necessary to tell the gateway which Input and Output variables are to be used. This is done with the commands LonInMapping and LonOutMapping. All SNVT's which should be available on LON-side are declared by those two commands.
All SNVT-types available are given in the map-table, which is a normal script buffer variable. This variable consists of a number of bytes, and each byte defines an SNVT-type. The commands LonInMapping / LonOutMapping create all requested SNVT's.
LON variables of type 0 are defined by the commands Set (BusInputSize,x) and Set (BusOutputSize, x). By setting BusInputsize or BusOutputSize to a value greater 0 a variable of type with the given size is created. If the given size is 0 or the command is never called no SNVT 0 is created.
The similar behaviour is available for output data.
|
| example_ModbusTCP | |
|---|---|
This script demonstrates the usage of script commands
relating to Modbus TCP.
|
| example_Profibus_DiagnoseData | |
|---|---|
For UNIGATE Profibus SC/IC it is possible to set after "BusStart" a "user diagnostic" data to the PLC.
|
| example_Profibus_DPV1 | |
|---|---|
This script needs a hardware which is capable of running DPV1,
you will receive errors if your hardware does not support DPV1.
This command is used to initialize a object, which should be read or write by an acyclic profibus call.
You must provide a Channel number, which is a byte value in the range of 1..255.
You must provide the Slot, which corresponds to the Profibus DPV1 Slot Number. Possible values are from 0..254.
Provide an Index as a value in the range 0..254, and a length of the object, which is in the range of 1..79 byte.
Your a_Data buffer must be big enough to get hold of all data bytes defined by the objects length.
Every time a Master write data into an object the b_Changed variable is set to "1", so the script may process the date in the a_Data buffer.
|
| example_Profibus_IC_DPV1 | |
|---|---|
This script needs a IC-hardware which is capable of running DPV1,
you will receive errors if your hardware does not support DPV1.
This command is used to initialize a object, which should be read or write by an acyclic profibus call.
You must provide a Channel number, which is a byte value in the range of 1..255.
You must provide the Slot, which corresponds to the Profibus DPV1 Slot Number. Possible values are from 0..254.
Provide an Index as a value in the range 0..254, and a length of the object, which is in the range of 1..79 byte.
Your a_Data buffer must be big enough to get hold of all data bytes defined by the objects length.
Every time a Master write data into an object the b_Changed variable is set to "1", so the script may process the date in the a_Data buffer.
|
| example_Profibus_ParameterData | |
|---|---|
For UNIGATE Profibus SC/IC it is possible to read out after "BusStart" the parameter data from the PLC.
Make sure that the value of "w_NumberChar" has the calculate lenght.
If the lenght is to long for the hardware you get an Error.
If the lenght is notequal you get from the PLC, the PLC shows an "parameter fail" and the UNIGATE doesn´t work.
If the lenght is equal and the UNIGATE works without an error, the parameter data are stored in variable "a_source" after "BusStart" and Wait ( Bus_Active ) ;.
|
| example_SendEMail | |
|---|---|
This script demonstrates sending an EMail
values given for IP Addresses etc may not work because
you need your valid values.
the EMail is defined by variables and send once
after sending the script stops.
no other communication is used.
|
| ICDPInitConfigBytes | |
|---|---|
For UNIGATE IC it is important to set only a special kind of config bytes into the script.
Only this config table is available for the user from the GSD file.
Each configuration can have a maximum of 15 config bytes plus the first byte, it is the configLen.
You can set a different kind of configuration.
Terminate the last configuration with 0x00.
The minimum buffer for one configuration is 17 byte.
|
| MPI_ModSlv01 | |
|---|---|
This script realize the Modbus-RTU-SLAVE function.
|
| MPI_ModSlv02 | |
|---|---|
|
|
| MPI_ModSlv03 | |
|---|---|
|
|