You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > Search Forums

Showing results 1 to 17 of 17
Search took 0.01 seconds.
Search: Posts Made By: parky
Forum: LIVE PLC Questions And Answers March 9th, 2021, 04:39 AM
Replies: 60
Views: 4,052
Posted By parky
Just had a very quick look at the manual and it...

Just had a very quick look at the manual and it looks like you can create events based on tags changing state & use those events to tun your code.
Forum: LIVE PLC Questions And Answers March 8th, 2021, 02:39 PM
Replies: 60
Views: 4,052
Posted By parky
Never used FT but it may be possible to split the...

Never used FT but it may be possible to split the code, remove the if statements and use those variables on change event to call the code.
The problem is the activate display only runs the code when...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 01:42 PM
Replies: 60
Views: 4,052
Posted By parky
Glad you got it right, I thought that "NULL" is...

Glad you got it right, I thought that "NULL" is the way to go.
Forum: LIVE PLC Questions And Answers March 5th, 2021, 12:48 PM
Replies: 60
Views: 4,052
Posted By parky
I suppose it depends on how the VBA handles the...

I suppose it depends on how the VBA handles the Date format etc. My code was done on a Scada system where for some reason DATE does not work when populating the table, so had to format it in the way...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 11:56 AM
Replies: 60
Views: 4,052
Posted By parky
Here is the result

Here is the result
Forum: LIVE PLC Questions And Answers March 5th, 2021, 11:53 AM
Replies: 60
Views: 4,052
Posted By parky
Right This is how I got it to work First I...

Right This is how I got it to work
First I declared the variables as I did not have any
Notice the date & time need a ' either side of the format date or time (it is difficult to see the ' as it's...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 08:17 AM
Replies: 60
Views: 4,052
Posted By parky
I think the "EMPTY" bit may be the problem ...

I think the "EMPTY" bit may be the problem

DT_FIM_RECEBIMENTO = " & aaaEmpty _
I have never heard of using this it is normally
DT_FIM_RECEBIMENTO IS NULL
However, I tried to recreate this but...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 02:24 AM
Replies: 60
Views: 4,052
Posted By parky
I agree with Mikey, one other thing to try is...

I agree with Mikey, one other thing to try is start with a small bit of the SQL string i.e. instead of populating all the fields just start with one, like update the total litres, then build on it. ...
Forum: LIVE PLC Questions And Answers February 27th, 2021, 03:16 AM
Replies: 60
Views: 4,052
Posted By parky
First of all I can see a couple of brackets in...

First of all I can see a couple of brackets in your query.
Also what is the and for I think it is all to do with text errors & formatting.

SQLStr = " Update TBL_RCP_SETPOINT set...
Forum: LIVE PLC Questions And Answers February 26th, 2021, 01:40 PM
Replies: 60
Views: 4,052
Posted By parky
Like I said previously, SQL strings have to be...

Like I said previously, SQL strings have to be exact or they often fail.
another one to watch out for is if the length of the string is very long and you want to put it on two lines you have to use...
Forum: LIVE PLC Questions And Answers February 26th, 2021, 11:20 AM
Replies: 60
Views: 4,052
Posted By parky
Here is a simple test I did, was the error in the...

Here is a simple test I did, was the error in the string try comment it out and comment out the execute and just check it opens & closes the database if not then you probably do not have the...
Forum: LIVE PLC Questions And Answers February 26th, 2021, 09:44 AM
Replies: 60
Views: 4,052
Posted By parky
Can you open the table in SQLExpress and show the...

Can you open the table in SQLExpress and show the table structure i.e. the fields & type, post a screenshot . like this so I can re-create it & see if I can populate it.
One other thing I noticed is...
Forum: LIVE PLC Questions And Answers February 25th, 2021, 12:39 PM
Replies: 60
Views: 4,052
Posted By parky
Not sure if this helps but in excel this is...

Not sure if this helps but in excel this is typical problem.
An automation error could occur when you are referring to a workbook or worksheet via a variable, but the variable is no longer active. ...
Forum: LIVE PLC Questions And Answers February 25th, 2021, 03:36 AM
Replies: 60
Views: 4,052
Posted By parky
I have not used FT but in the older RSV32 logging...

I have not used FT but in the older RSV32 logging to databases was easy, just triggers to log data, however, I think update command was not one of the commands so would have to use VB.
Forum: LIVE PLC Questions And Answers February 24th, 2021, 02:16 PM
Replies: 60
Views: 4,052
Posted By parky
you must make sure the data types are correct. ...

you must make sure the data types are correct.
You need to format the Date

Dim My_Date as variant
My_date = "'" + Format(Date,"yyyy-mm-dd") + "'"
Dim My_Tag1, My_Tag2 as integer (note it...
Forum: LIVE PLC Questions And Answers February 24th, 2021, 02:16 AM
Replies: 60
Views: 4,052
Posted By parky
First of all have you created a "DSN" (Data...

First of all have you created a "DSN" (Data source name), this is the easiest way to configure the connection string, so you go to Control panel, system & security, administrative tools, ODBC Data...
Forum: LIVE PLC Questions And Answers February 23rd, 2021, 04:01 AM
Replies: 60
Views: 4,052
Posted By parky
Here is some code using VB, might vary in SE ...

Here is some code using VB, might vary in SE

Option Explicit
Dim GroupStr1,SQLStr, BatchIDStr As String
Dim Rs1 As New ADODB.Recordset
Dim Conn1 As New ADODB.Connection
Dim Times As Variant...
Showing results 1 to 17 of 17

 
Forum Jump

All times are GMT -4. The time now is 01:13 PM.


.