|
Hi Dwayner79,
I work with modbus quite a bit myself. Unfortunately, I've yet to find a good .NET modbus control/library. Most of them are just wrappers around ActiveX controls.
If you don't mind using an ActiveX then I highly recommend the one in the below link. It's fast. It's relatively cheap. It supports modbus ASCII, RTU, and TCPIP. The biggest plus is that it communicates on its own thread so that it won't hang up your app.
http://www.modbustools.com/modbus_activex.asp[^]
I've also tried WinTech's modbus ActiveX. I'd say stay away from this one. It's slow and it seems to be unstable on XP systems.
I hope this helps.
|
|
|
|
|
Awesome. I hate going to ActiveX, but looks like I will have to. Thanks fo rthe recommendation.
-Cheers
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
Hello,
I developed a middle layer DLL file - mainly used to declare the database connectivity and some database dependent functions. If i register this DLL file in a remote pc(or in other words, register in a remote assembly) where database is stored, how can i refer this assembly from a VB project? Also how to keep the consistency in the path refered when a custom deployment is done.
Thanks in advance.
Regards
Nito Jose
|
|
|
|
|
I have a lot of connections made in Visual Studio, and I want to get rid of some of them. Any way to just erase them so when I make a new connection, there aren't as many to choose from?
|
|
|
|
|
|
Hi, have a problem.
I'm filling a dataset from db and a datagrid from the dataset in my application. The problem is that it sometimes takes some time and i want to make it possible for my users to abort the process. Have tried with delegates and threads and i don't seem to make it work. (The idea is to flash a form to the user with an abort button) This abort button will prefferably exit the db request.
Ideas anyone....
|
|
|
|
|
evertbylt wrote: I'm filling a dataset from db and a datagrid from the dataset in my application
Where is the bottle neck at? Is it pulling the data from the db or adding that information to the data grid?
If the bottle neck happens while pulling data from the database, step through your code. There is a problem with the query / stored procedure.
More than likely the problem is with adding the data to the grid, again start debugging why is it taking so long? What are you doing with that’s overly complicating the process?
evertbylt wrote: Have tried with delegates and threads and i don't seem to make it work. (The idea is to flash a form to the user with an abort button) This abort button will prefferably exit the db request.
You could always (this is VB.NET right) start a thread have it pull the data and post messages to the grid adding the text that way. In your little cancel dialog send the worker thread a message to stop sending data out and clean up after it self.
Hope that helps…
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
....was a little fuzzy, sorry about that...and thanks for responding.
The bottleneck is absolutely (timed it!) the database binding (behind the .NET curtains)
myCommand.CommandText = sqlQuery
myCommand.Connection = myConn
myFancyDataAdapt.SelectCommand = myCommand
myFancyDataAdapt.Fill(myDS, "myDataBaseView")
Normally, no problem at all. If no of records > 100000 the time for filling my dataset is
acceptable. However when the number of recs from db exceeds 1-2 million the time for
making the ds > 30 secs, which can be ok, but my ambition is to make it cancellable...
Have dived into the "new" Background Worker for VS 2005, but all the examples i have found
concerns recursive functions such as fibunachi calculations an so forth...
This is ONE long mother of an operation and no feedback as the sub progresses...
Also tried with "normal" threads and set them to background, but i don't seem to be able to abort them
*grmpf*. Must be thick in the head..
You say "stop sending data" and "clean up after it self"...sounds nice...could i be bould and ask you to be more specific.
|
|
|
|
|
evertbylt wrote: However when the number of recs from db exceeds 1-2 million the time for
making the ds > 30 secs
Found the problem its a design flaw, do your users really need to look at > 1 million records? Will they be able to gleam more information from 1 million-verse 1000 property (filtered for info they want / need to see) selected rows?
Here is a way to handle this, do this in transactions, fetch 1000 or so at a time, display that to the user, if they want more fetch more and remove the previous 1000. If they scroll backwards then fetch the previous 1000.
evertbylt wrote: but my ambition is to make it cancellable...
Doubt that will ever work, binding a data grid to data doenst return until its complete. Your app can not process any messages until that function has returned. It can’t be canceled, unless there is an error binding it.
evertbylt wrote: *grmpf*. Must be thick in the head..
You say "stop sending data" and "clean up after it self"...sounds nice...could i be bould and ask you to be more specific
Don’t worry about it I thought you where doing something else completely. This is one case where threads won’t help.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
OK, thanks for helping. At least one learns a little something when facing problems like this
|
|
|
|
|
evertbylt wrote: OK, thanks for helping
No Problem...
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Hi,
I am developing some software for US client. Recently my client wants to develop somethin Tiny OS, with RFID and Network OS. But I am not experienced with these technologies, I have VS 2003/2005(Beta-Evaluation) and SQL Server 2003/2005(Beta). I dont know what is the hardware and software requirement for doing this project.
Please can anyone assist me, what are the H/W as well as S/W requirement and am I able to do these with my existing softwares(Visual studio, Do i need to purchase any Softwares, can I get it as an evaluation version from anywhere...
Please help me at the earliest
|
|
|
|
|
how to use fax component in vb.net to make aplication fax???
|
|
|
|
|
I wanted to ask if i can do an interface in excel where i can enter a value from the table and return another value that coresponds! Is it possible?
Help!
|
|
|
|
|
You can! Did you want to get a value from your worksheet and perform a calculation on it? Or is this a value from and external table? Please give more details.
Ken
|
|
|
|
|
to convert I build shamsi.OCX
connect me to send;)
|
|
|
|
|
Dude - none of this makes any sense. Please try to explain what you want, because no-one is going to know how to answer this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Formula
1. Subract 621 from Milady year 2005 - 621 = 1384 (x)
2. Divede x to 33 1384 : 33 = 41.939 (=42)
3. Add division result to x 1384 + 42 = 1426
Protected Function ConvertMiladyToHicry(ByVal Year As Integer) As Integer<br />
Return Year - 621 + Math.Round(Year - 621 / 33)<br />
End Function
|
|
|
|
|
Hi there,
i have a database which contain some junk character in some fields like for ex:"è" i need to replace this junk character into "è" the application where iam using this database is ASP page and need to have a solution where at one shot i can replace all this junk charac in my database fields there are around 7 different junk character in 5 fields and i have 500 records like this in my database
i try to solve this problem with the javascript but i need a connection so that in one click i can loop thro all the fields and replace the character but cant do it here is the code snippet :
sqlqry=""
set rstest=server.CreateObject("ADODB.Recordset")
sqlqry = "select Title, Description, Description_abtract, Dc_source, Rights_Rightsholder from Articles_production"
rstest.Open sqlqry,conn,3,3
var str= sqlqry
(str.replace(/è/gi,"è"))
(str.replace(/é/gi,"é"))
(str.replace(/’/gi,"’"))
(str.replace(/“/gi,"“"))
(str.replace(/â€/gi,"”"))
(str.replace(/ç/gi,"ç"))
(str.replace(/ä/gi,"ä"))
pls any solutions
regards
cyus
|
|
|
|
|
You could (should be able to depending on the database u r using?) do the entire thing at the database level, below is a mssql example -
update Articles_production set Description = replace(Description,'junk character','replacement character'), Description_abtract = ....
You may however have to run the update statement for each junk character.
|
|
|
|
|
Hi jeffrey,
i try the above qury in my query Analyzer it show me error:
argument data type ntext is invalid for argument 1 of replace function.
To support unicode character i created datatype as ntext.
Regards
cyus
|
|
|
|
|
if you know that the data in the columns doesn't exceed a length of 8000 you could try something like - update Table1 set test1=replace(convert(varchar(8000),test1),'x','a'),
test2=replace(convert(varchar(80000),test2),'x','a')
Otherwise you might have to go the code route.
|
|
|
|
|
hey Jeffery,
i try this in my code but some problem in the updated stmt can u help me shoot wht the problem is the compiler thro me error The name Var1 does not exist in the class or namespace of the project....
here is the codesnippet
string strsql;
DataTable dt;
SqlDataAdapter da;
SqlConnection objConn = new SqlConnection("data source=yusuff;user id=sa;password=sa;initial catalog=Heritage");
dt = new DataTable();
strsql = "select * from Articles_production";
da = new SqlDataAdapter(strsql,objConn);
da.Fill(dt);
if(dt.Rows.Count > 0)
{
//foreach (DataRow dr in dt.Rows) //ervy loop
for (int i=0;i
|
|
|
|
|
Hi there,
i have a database which contain some junk character in some fields like for ex:"è" i need to replace this junk character into "è" the application where iam using this database is ASP page and need to have a solution where at one shot i can replace all this junk charac in my database fields there are around 7 different junk character in 5 fields and i have 500 records like this in my database
pls any solutions
regards
cyus
|
|
|
|
|
I am having problems with using an array to put info into a stack, I have to use parenthesis and put them in a stack and see if the string has equal parenthesis and i can come up with a code to just get the "(" out of a string
|
|
|
|