plc ile visual studio 2005 haberleşmesi...

ilkery.

Üye
Katılım
3 Mar 2011
Mesajlar
27
Puanları
1
Elimde visual stduio 2005 yazılımış hazır program var, bu da led ekran var elimde ona yazı gonderıor.
ben ise plc deki veriyi visual a aktarıp led ekrandan gormek ıstıorum nasıl yaparım yardım eder misiniz.
 
Bu soru bence acil değil, sorduğunuz soruda çok eksiklikler var. Visual studionun içindi birsürü yazılım çeşidi var Visual basic mi, Visual C# mı, Visual C++ mı, ASP mi vs. İletişim protokolu varmı modbus, profibus vs. programın kodları burada olmayınca size nasıl bir yardımda buluna bilirizki?
 
Son düzenleme:
visual studio 2005 yazıyor program bu isterseniz yollyayım...
 
c# ile yazılmıs
 
buraya nasıl eklerim belgeleri olmadı bir bakar mısınız?
 
namespace Test
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;


/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}


#region Windows Form Designer generated code


/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.textBox1 = new System.Windows.Forms.TextBox();
this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
this.button2 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(148, 86);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(399, 101);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "<T>00,K,N,TR-LED www.trled.com.tr</T>";
//
// serialPort1
//
this.serialPort1.BaudRate = 19200;
this.serialPort1.PortName = "COM2";
this.serialPort1.WriteTimeout = 20;
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(148, 193);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(399, 38);
this.button2.TabIndex = 4;
this.button2.Text = "Test";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// comboBox1
//
this.comboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"COM1",
"COM2",
"COM3",
"COM4",
"COM5",
"COM6",
"COM7",
"COM8",
"COM9"});
this.comboBox1.Location = new System.Drawing.Point(148, 11);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(88, 28);
this.comboBox1.TabIndex = 9;
this.comboBox1.Text = "COM1";
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(75, 20);
this.label1.TabIndex = 10;
this.label1.Text = "Com Port";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(12, 89);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 20);
this.label3.TabIndex = 12;
this.label3.Text = "Test";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(556, 242);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.button2);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "Form1";
this.Text = "Test";
this.ResumeLayout(false);
this.PerformLayout();


}


#endregion


private System.Windows.Forms.TextBox textBox1;
private System.IO.Ports.SerialPort serialPort1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
}
}
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void button1_Click(object sender, EventArgs e)
{
}


private void button2_Click(object sender, EventArgs e)
{
serialPort1.PortName = comboBox1.Text;
serialPort1.Open();
serialPort1.Write(textBox1.Text);
serialPort1.Close();
}


private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
 

Forum istatistikleri

Konular
128,133
Mesajlar
915,306
Kullanıcılar
449,849
Son üye
cagan20

Yeni konular

Geri
Üst