1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

rearranged and added RSCAD example drafts

This commit is contained in:
Steffen Vogel 2017-05-08 12:52:31 +02:00
parent ad13abd675
commit 1bae47f4c3
75 changed files with 14416 additions and 9716 deletions

View file

@ -1,5 +1,5 @@
POINT0 int
POINT1 int
POINT2 int
POINT3 int
POINT4 float
POINT0 int
POINT1 int
POINT2 int
POINT3 int
POINT4 float

View file

@ -1,28 +1,28 @@
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
12. Press the Send button in the GUI and the UDP packet will be sent to the simulation and is displayed in the meters POINTIn0 and POINTin1.

View file

@ -1,107 +1,107 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
}

View file

@ -1,102 +1,102 @@
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
}

View file

@ -1,106 +1,106 @@
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0

View file

@ -7,50 +7,50 @@ Nodes and Wires...
Electrical nodes found: 0
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 11:09:29 May 26 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.53
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 32 control components.
End of process. Peak memory usage = 327438336 bytes
rtc terminated successfully.
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 11:09:29 May 26 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.53
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 32 control components.
End of process. Peak memory usage = 327438336 bytes
rtc terminated successfully.

View file

@ -1,5 +1,5 @@
POINT0 int
CRTSECD int
CRTNSEC int
POINT3 int
POINT4 float
POINT0 int
CRTSECD int
CRTNSEC int
POINT3 int
POINT4 float

View file

@ -1,28 +1,28 @@
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
12. Press the Send button in the GUI and the UDP packet will be sent to the simulation and is displayed in the meters POINTIn0 and POINTin1.

View file

@ -1,107 +1,107 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
}

View file

@ -1,102 +1,102 @@
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
}

View file

@ -1,106 +1,106 @@
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0

View file

@ -7,50 +7,50 @@ Nodes and Wires...
Electrical nodes found: 0
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 11:09:29 May 26 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.53
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 32 control components.
End of process. Peak memory usage = 340852736 bytes
rtc terminated successfully.
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 11:09:29 May 26 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.53
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 32 control components.
End of process. Peak memory usage = 340852736 bytes
rtc terminated successfully.

View file

@ -1,5 +1,5 @@
POINT0 int
CRTSECD int
CRTNSEC int
POINT3 int
POINT4 float
POINT0 int
CRTSECD int
CRTNSEC int
POINT3 int
POINT4 float

View file

@ -1,5 +1,5 @@
POINT0 int
POINT1 int
POINT2 int
POINT3 int
POINT4 float
POINT0 int
POINT1 int
POINT2 int
POINT3 int
POINT4 float

View file

@ -1,28 +1,28 @@
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
This example demonstrates UDP socket communication. Data is sent from the RTDS to a standalone java program, and the java program can send information back to the RTDS.
This is done using the SKT protocol on the GTNETx2 card.
Note: You need to install the JDK to be able to compile java files http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html MAKE sure the path to the bin folder of the JDK
is added to the windows path variable (google to figure this out)
Note: If you want some extra information printed in the DOS window set the boolean DEBUG=true
1. Open a windows command shell and go to the Tutorial|SAMPLES|GTSKT|ExampleGUI folder.
2. Compile the .java code. Use the command below in the windows command shell
javac GNET_SKT_UDP_GUI.java
3. Run the code using the command below
java GNET_SKT_UDP_GUI
4. Upon running the program, two panels will appear. The GTNET-SKT UDP Server and the GTNET-SKT UDP Client.
A file chooser box can be used to request the file name that defines the name and type of the received data or type of data to send.
Browse to the file named received.txt in the Tutorial|SAMPLES|GTSKT folder. The table will be filled with data from the file or the user can add/delete items from the table
5. Press the Start button in the GUI
A message will be displayed in the Messages Text area
Server socket created. Waiting for incoming data ...
6. A file chooser box can be used to request the file name that defines the name and type of type of data to send. To manually add points press
the Add button in the GTNET-SKT UDP Client panel and add 2 points, change the type of point 0 to "int"
7. Press the Send button in the GUI and the UDP packet will be sent to the GTNET-SKT UDP Server panel.
TO use the GTNET-SKT the user must change the Remote Server Settings IP Address and Port in the GTNET-SKT UDP Client panel so the program will send the UDP packet to the GTNET
8. Open the Draft case, edit the GTNET-SKT component, go to the Remote IP Configuration tab and change the Remote IP address to the IP address of your PC.
9. Compile the Draft case, ensure to change the allocation of the component to the proper RTDS processor and GTIO port based on your hardware configuration.
10. Run the simulation.
11. Press the Send button in the simulation, the value on the Point slider is sent to the java program and will appear in the GTNET-SKT UDP server panel.
12. Press the Send button in the GUI and the UDP packet will be sent to the simulation and is displayed in the meters POINTIn0 and POINTin1.

View file

@ -1,107 +1,107 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.Border;
class SoftEdgeBorder implements Border
{
protected int m_w=3;
protected int m_h=3;
protected Color m_topColor = Color.gray;//white;
protected Color m_bottomColor = Color.gray;
public SoftEdgeBorder()
{
m_w=3;
m_h=3;
}
public SoftEdgeBorder(int w, int h) {
m_w=w;
m_h=h;
}
public SoftEdgeBorder(int w, int h, Color col)
{
m_w=w;
m_h=h;
m_topColor = col;
m_bottomColor = col;
}
public SoftEdgeBorder(int w, int h, Color topColor,
Color bottomColor)
{
m_w=w;
m_h=h;
m_topColor = topColor;
m_bottomColor = bottomColor;
}
public Insets getBorderInsets(Component c)
{
return new Insets(m_h, m_w, m_h, m_w);
}
public boolean isBorderOpaque() { return true; }
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h)
{
w--;
h--;
g.setColor(m_topColor);
g.drawLine(x, y+h-m_h, x, y+m_h);
g.drawArc(x, y, 2*m_w, 2*m_h, 180, -90);
g.drawLine(x+m_w, y, x+w-m_w, y);
g.drawArc(x+w-2*m_w, y, 2*m_w, 2*m_h, 90, -90);
g.setColor(m_bottomColor);
g.drawLine(x+w, y+m_h, x+w, y+h-m_h);
g.drawArc(x+w-2*m_w, y+h-2*m_h, 2*m_w, 2*m_h, 0, -90);
g.drawLine(x+m_w, y+h, x+w-m_w, y+h);
g.drawArc(x, y+h-2*m_h, 2*m_w, 2*m_h, -90, -90);
}
}

View file

@ -1,102 +1,102 @@
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Action;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.JButton;
class SoftEdgeButton extends JButton
{
private static final float arcwidth = 6.0f;
private static final float archeight = 6.0f;
protected static final int focusstroke = 2;
protected final Color currFocusBorderCol = new Color(100,113,200, 200);//(110,123,139, 200);//(100,150,255,200); //rgba
protected final Color pressedCol = new Color(197, 220, 250);//(230,230,230);
protected final Color hoverBorderCol = new Color(140,211,251);//(135,206,250);//Color.ORANGE;
protected final Color buttonCol = new Color(202, 225, 255);//(250, 250, 250);
protected final Color buttonBorderCol = Color.gray;
protected Shape shape;
protected Shape border;
protected Shape base;
public SoftEdgeButton() {
this(null, null);
}
public SoftEdgeButton(Icon icon) {
this(null, icon);
}
public SoftEdgeButton(String text) {
this(text, null);
}
public SoftEdgeButton(Action a) {
this();
setAction(a);
}
public SoftEdgeButton(String text, Icon icon) {
setModel(new DefaultButtonModel());
init(text, icon);
setContentAreaFilled(false);
setBackground(buttonCol);
initShape();
}
protected void initShape() {
if(!getBounds().equals(base)) {
base = getBounds();
shape = new RoundRectangle2D.Float(0, 0, getWidth()-1, getHeight()-1, arcwidth, archeight);
border = new RoundRectangle2D.Float(focusstroke, focusstroke,
getWidth()-1-focusstroke*2,
getHeight()-1-focusstroke*2,
arcwidth, archeight);
}
}
private void paintFocusAndRollover(Graphics2D g2, Color color) {
g2.setPaint(new GradientPaint(0, 0, color, getWidth()-1, getHeight()-1, color.brighter(), true));
g2.fill(shape);
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(border);
}
@Override protected void paintComponent(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if(getModel().isArmed()) {
g2.setColor(pressedCol);
g2.fill(shape);
}else if(isRolloverEnabled() && getModel().isRollover()) {
paintFocusAndRollover(g2, hoverBorderCol);
}else if(hasFocus()) {
paintFocusAndRollover(g2, currFocusBorderCol);
}else{
g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, (int)(getHeight()-1)/*-1*/, getBackground(), false));
//g2.setColor(getBackground());
g2.fill(shape);
}
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(getBackground());
super.paintComponent(g2);
}
@Override protected void paintBorder(Graphics g) {
initShape();
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(buttonBorderCol);
g2.draw(shape);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
@Override public boolean contains(int x, int y) {
initShape();
return shape.contains(x, y);
}
}

View file

@ -1,106 +1,106 @@
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
RSCAD 4.003.1aa
INFORMATION FILE: gtnet_skt_2point_tcp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_tcp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 170 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -2.147E7
MAX: 2.147E7
VALUE: 1718000.0
COMPONENT: BUTTON
BOX AT (120,180), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (440,12), DIMENSIONS 115 x 150
NAME:
ICON: EXISTS
ICON AT: (484,68)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 4
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (192,16), DIMENSIONS 132 x 144
NAME:
ICON: EXISTS
ICON AT: (323,247)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: POINT0
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 6
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 116 x 148
NAME:
ICON: EXISTS
ICON AT: (287,112)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 9
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0

View file

@ -7,50 +7,50 @@ Nodes and Wires...
Electrical nodes found: 0
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 10:56:54 Feb 5 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.14
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 71 control components.
End of process. Peak memory usage = 340332544 bytes
rtc terminated successfully.
Running In Pre-Processor Mode (RTDSPCPP Inclusion)
REAL-TIME DIGITAL SIMULATOR POWER SYSTEM COMPILER
(c) Copyright 1994-2008 RTDS Technologies Inc.
Version C10.04
Compilation Time: 10:56:54 Feb 5 2015
Data file name: gtnet_skt_2point_udp.dtp
Inf file name: tmp.gtnet_skt_2point_udp.inf
Map file name: gtnet_skt_2point_udp.map
Output file name: gtnet_skt_2point_udp_r#
Configuration file directory: .
Configuration file name: C:\RSCAD\HDWR\config_file_02.txt
Title from data file: "Test Circuit"
Library file directory: C:\RSCAD/RTDS
Library file name: rt_sim.lib
Library file version: 62.57
Library file directory: C:\RSCAD/RTDS
Library file name: rpc.lib
Library file version: 24.14
Time-step used = 50.000000 us
Network Conductance Matrix Overlay Statistics:
Subsystem 1 contains 0 matrix overlays.
Control Component Statistics:
Subsystem 1 contains 71 control components.
End of process. Peak memory usage = 340332544 bytes
rtc terminated successfully.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,242 @@
RSCAD 5.000.6
INFORMATION FILE: gtnet_skt_2point_udp.inf
FILE TO DOWNLOAD: gtnet_skt_2point_udp
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMTRADE PLOT SAVE FREQUENCY: 50.0
COMPONENT: SLIDER
BOX AT (20,12), DIMENSIONS 84 x 150
NAME: Point
ICON: NONE
ICON AT: (176,99)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Point0
UNITS:
MIN: -21474.83647
MAX: 21474.83647
VALUE: -3865.0
COMPONENT: METER
BOX AT (324,12), DIMENSIONS 115 x 150
NAME:
ICON: ACTIVE
ICON AT: (176,108)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rxCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: BUTTON
BOX AT (108,12), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (291,133)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send
COMPONENT: BUTTON
BOX AT (108,88), DIMENSIONS 50 x 70
NAME:
ICON: NONE
ICON AT: (812,110)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Inputs
DESC: Send2
COMPONENT: METER
BOX AT (316,168), DIMENSIONS 115 x 150
NAME:
ICON: ACTIVE
ICON AT: (176,60)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: txCnt
UNITS:
MIN: 0.0
MAX: 10000.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (556,12), DIMENSIONS 108 x 150
NAME:
ICON: ACTIVE
ICON AT: (176,8)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
UNITS: units
MIN: -100.0
MAX: 100.0
FONT_SIZE: 16
PRECISION: 3
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (664,12), DIMENSIONS 108 x 150
NAME:
ICON: ACTIVE
ICON AT: (244,8)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 3
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (304,196), DIMENSIONS 108 x 150
NAME:
ICON: ACTIVE
ICON AT: (312,8)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin2
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 3
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (312,196), DIMENSIONS 108 x 150
NAME:
ICON: ACTIVE
ICON AT: (380,8)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin3
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 3
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (384,196), DIMENSIONS 108 x 150
NAME:
ICON: ACTIVE
ICON AT: (448,8)
GROUP: (NONE)
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin4
UNITS: units
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
PRECISION: 3
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: PLOT
BOX AT (8,240), DIMENSIONS 1252 x 380
NAME:
ICON: EXISTS
ICON AT: (476,344)
GROUP: (NONE)
MIN: 0.0
MAX: 1.0
UNLOCKED
NUMBER OF GRAPHS: 1
X RANGE: DEFAULT
X_DIGITS_OF_PRECISION: 6
X_AXIS_NOTATION: FIXED
GRAPH 1: 1 CURVE
Y MIN: 0.0
Y MAX: 1.0
Y LABEL: units
Y_AXIS_VISIBLE: true
Y_DIGITS_OF_PRECISION: 6
MAX_CURVE_LABELS: 6
X_GRID_LINES: 5
Y_GRID_LINES: 5
Y_AXIS_NOTATION: FIXED
SHOW CURVE LABELS
SHOW GRID LINES
SMART SCALE
CURVE 1:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
COLOR: BLACK
LABEL: POINTin1
PAGE HEIGHT: 0.0
PAGE WIDTH: 0.0
TOP MARGIN: 0.0
BOTTOM MARGIN: 0.0
LEFT MARGIN: 0.0
RIGHT MARGIN: 0.0
GRAPH SPACING: 0.0
COMPONENT: PLOT
BOX AT (20,172), DIMENSIONS 1252 x 380
NAME:
ICON: ACTIVE
ICON AT: (354,343)
GROUP: (NONE)
MIN: 0.0
MAX: 1.0
UNLOCKED
NUMBER OF GRAPHS: 1
X RANGE: DEFAULT
X_DIGITS_OF_PRECISION: 6
X_AXIS_NOTATION: FIXED
GRAPH 1: 5 CURVE
Y MIN: 0.0
Y MAX: 1.0
Y LABEL: units
Y_AXIS_VISIBLE: true
Y_DIGITS_OF_PRECISION: 6
MAX_CURVE_LABELS: 6
X_GRID_LINES: 5
Y_GRID_LINES: 5
Y_AXIS_NOTATION: FIXED
SHOW CURVE LABELS
SHOW GRID LINES
SMART SCALE
CURVE 1:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTIn0
COLOR: BLACK
LABEL: POINTIn0
CURVE 2:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin1
COLOR: RED
LABEL: POINTin1
CURVE 3:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin2
COLOR: BLUE
LABEL: POINTin2
CURVE 4:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin3
COLOR: GREEN
LABEL: POINTin3
CURVE 5:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: POINTin4
COLOR: CYAN
LABEL: POINTin4
PAGE HEIGHT: 0.0
PAGE WIDTH: 0.0
TOP MARGIN: 0.0
BOTTOM MARGIN: 0.0
LEFT MARGIN: 0.0
RIGHT MARGIN: 0.0
GRAPH SPACING: 0.0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,137 @@
RSCAD 5.000.6
INFORMATION FILE: gtnet_skt_udp_loopback_rtt.inf
FILE TO DOWNLOAD: gtnet_skt_udp_loopback_rtt
FINISH TIME: 0.2 SECONDS
PRE-TRIGGER: 20%
PLOT DENSITY: EVERY POINT
METER UPDATE FREQUENCY: 1000
COMPONENT: GROUPING
BOX AT (12,12), DIMENSIONS 69 x 108
NAME:
ICON: NONE
ICON AT: (224,35)
GROUP: (NONE)
MIN: 0.0
MAX: 1.0
CHILD_COMPONENT_COUNT: 2
COMPONENT: METER
BOX AT (225,35), DIMENSIONS 115 x 150
NAME:
ICON: ACTIVE
ICON AT: (13,12)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rtt1
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: METER
BOX AT (224,88), DIMENSIONS 115 x 150
NAME:
ICON: ACTIVE
ICON AT: (12,65)
GROUP: (NONE)
GROUP: Subsystem #1|CTLs|Vars
DESC: rtt2
UNITS:
MIN: 0.0
MAX: 1.0
FONT_SIZE: 16
SHOW AS METER_2
COLOR FALSE
VISUAL_STYLE: 0
COMPONENT: PLOT
BOX AT (84,20), DIMENSIONS 920 x 296
NAME:
ICON: EXISTS
ICON AT: (538,221)
GROUP: (NONE)
MIN: 0.0
MAX: 1.0
UNLOCKED
NUMBER OF GRAPHS: 1
X RANGE: DEFAULT
X_DIGITS_OF_PRECISION: 6
X_AXIS_NOTATION: FIXED
GRAPH 1: 2 CURVE
Y MIN: 0.0
Y MAX: 1.0
Y LABEL:
Y_AXIS_VISIBLE: true
Y_DIGITS_OF_PRECISION: 6
MAX_CURVE_LABELS: 6
X_GRID_LINES: 5
Y_GRID_LINES: 5
Y_AXIS_NOTATION: FIXED
SHOW CURVE LABELS
SHOW GRID LINES
SMART SCALE
CURVE 1:
GROUP: Subsystem #1|GTNETSKT|GTNETSKT1
DESC: cntr1
COLOR: BLACK
LABEL: cntr1
CURVE 2:
GROUP: Subsystem #1|CTLs|Vars
DESC: dtc
COLOR: RED
LABEL: dtc
PAGE HEIGHT: 0.0
PAGE WIDTH: 0.0
TOP MARGIN: 0.0
BOTTOM MARGIN: 0.0
LEFT MARGIN: 0.0
RIGHT MARGIN: 0.0
GRAPH SPACING: 0.0
COMPONENT: PLOT
BOX AT (84,324), DIMENSIONS 920 x 360
NAME:
ICON: EXISTS
ICON AT: (525,339)
GROUP: (NONE)
MIN: 0.0
MAX: 1.0
UNLOCKED
NUMBER OF GRAPHS: 1
X RANGE: DEFAULT
X_DIGITS_OF_PRECISION: 6
X_AXIS_NOTATION: FIXED
GRAPH 1: 3 CURVE
Y MIN: 0.0
Y MAX: 1.0
Y LABEL:
Y_AXIS_VISIBLE: true
Y_DIGITS_OF_PRECISION: 6
MAX_CURVE_LABELS: 6
X_GRID_LINES: 5
Y_GRID_LINES: 5
Y_AXIS_NOTATION: FIXED
SHOW CURVE LABELS
SHOW GRID LINES
SMART SCALE
CURVE 1:
GROUP: Subsystem #1|CTLs|Vars
DESC: ReadyToSend1
COLOR: BLACK
LABEL: ReadyToSend1
CURVE 2:
GROUP: Subsystem #1|CTLs|Vars
DESC: ReadyToSend2
COLOR: RED
LABEL: ReadyToSend2
CURVE 3:
GROUP: Subsystem #1|CTLs|Vars
DESC: Send
COLOR: BLUE
LABEL: Send
PAGE HEIGHT: 0.0
PAGE WIDTH: 0.0
TOP MARGIN: 0.0
BOTTOM MARGIN: 0.0
LEFT MARGIN: 0.0
RIGHT MARGIN: 0.0
GRAPH SPACING: 0.0