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 15 of 15
Search took 0.01 seconds.
Search: Posts Made By: drbitboy
Forum: LIVE PLC Questions And Answers March 9th, 2021, 06:57 AM
Replies: 60
Views: 4,053
Posted By drbitboy
A few quick comments: The [Dim Rs1 ...]...

A few quick comments:


The [Dim Rs1 ...] statement can be removed
The [Set Conn1 = Nothing] statement inside IF-ENDIF clauses can all be removed, and add one just before the final END...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 12:06 PM
Replies: 60
Views: 4,053
Posted By drbitboy
This is why I use the string variable [tick];...

This is why I use the string variable [tick]; clarity is everything when debugging.
Forum: LIVE PLC Questions And Answers March 5th, 2021, 09:11 AM
Replies: 60
Views: 4,053
Posted By drbitboy
Is it possible that '05/03/21' is being...

Is it possible that '05/03/21' is being interpreted as '2021-05-03' (03.May i.e. May third) instead of 2021-03-05 (05.Mar, 2021 i.e. March fifth i.e. today), or vice versa?
Forum: LIVE PLC Questions And Answers March 5th, 2021, 08:45 AM
Replies: 60
Views: 4,053
Posted By drbitboy
Can you show the table definition/declaration? ...

Can you show the table definition/declaration? Similar to the [describe name_of_table] statement in MysQL?


It looks like Date and Time may be internal values, not strings; try summat like...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 08:37 AM
Replies: 60
Views: 4,053
Posted By drbitboy
yes, as I noted I put ticks around everything,...

yes, as I noted I put ticks around everything, but they are not needed for numbers of course, although I expect SQL will make the conversion.


Also, as @parky notes the NULL check should be done...
Forum: LIVE PLC Questions And Answers March 5th, 2021, 05:39 AM
Replies: 60
Views: 4,053
Posted By drbitboy
You don't say if the error occurs when running...

You don't say if the error occurs when running the code, or when compiling the code so the code never runs. If the latter then, as noted by @MikeyN, one problem is the double-quotes ("") between...
Forum: LIVE PLC Questions And Answers February 26th, 2021, 09:39 AM
Replies: 60
Views: 4,053
Posted By drbitboy
1) You should delete that post, or at lease fuzz...

1) You should delete that post, or at lease fuzz out the password in the image.


2) Then I would suggest doing



MsgBox(SQLStr)
Forum: LIVE PLC Questions And Answers February 24th, 2021, 05:12 PM
Replies: 60
Views: 4,053
Posted By drbitboy
look at the links I sent. you need to add ...

look at the links I sent. you need to add



Set Ogroup = Application.CreateTagGroup(Me.AreaName)



or summat like that, before the first .Add
Forum: LIVE PLC Questions And Answers February 24th, 2021, 03:55 PM
Replies: 60
Views: 4,053
Posted By drbitboy
Look at the last link I sent, especially the...

Look at the last link I sent, especially the first post that uses something like this


also https://www.google.com/search?q=vba+factorytalk+view+taggroup+tag




Dim WithEvents Ogroup As...
Forum: LIVE PLC Questions And Answers February 24th, 2021, 02:59 PM
Replies: 60
Views: 4,053
Posted By drbitboy
http://www.plctalk.net/qanda/showthread.php?t=1025...

http://www.plctalk.net/qanda/showthread.php?t=102555


?
Forum: LIVE PLC Questions And Answers February 24th, 2021, 02:35 PM
Replies: 60
Views: 4,053
Posted By drbitboy
Apparently there is also an easier way to do this...

Apparently there is also an easier way to do this in FTV/SE, without using VB:




https://www.youtube.com/watch?v=oEw0ik3laww
Forum: LIVE PLC Questions And Answers February 24th, 2021, 01:26 PM
Replies: 60
Views: 4,053
Posted By drbitboy
That is in your PLC, is it not? Where is...

That is in your PLC, is it not?


Where is BD_SETPOINT declared and assigned in VBA code on FTView system?


For example,

1) Try
MsgBox(BD_SETPOINT)and I suspect you will get the same 424...
Forum: LIVE PLC Questions And Answers February 24th, 2021, 01:08 PM
Replies: 60
Views: 4,053
Posted By drbitboy
Where is BD_SETPOINT declared? e.g. ...

Where is BD_SETPOINT declared? e.g.



Dim BD_SETPOINT As ???



And where is BD_SETPOINT assigned a value? e.g.
Forum: LIVE PLC Questions And Answers February 24th, 2021, 10:51 AM
Replies: 60
Views: 4,053
Posted By drbitboy
Without the declaration of LevelTank1, we cannot...

Without the declaration of LevelTank1, we cannot guess at what the problem is. E.g. maybe it should be .Value instead of .value. Please ZIP and post all of the code.
Forum: LIVE PLC Questions And Answers February 24th, 2021, 08:46 AM
Replies: 60
Views: 4,053
Posted By drbitboy
post your code i.e. zip the files and attach to a...

post your code i.e. zip the files and attach to a post.
Showing results 1 to 15 of 15

 
Forum Jump

All times are GMT -4. The time now is 02:14 PM.


.