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 > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 11th, 2021, 03:46 AM   #1
Laurent_59550
Member
France

Laurent_59550 is offline
 
Join Date: Jun 2021
Location: Maroilles
Posts: 4
Accessing Cicode Tags with CitectVBA for script send email vba

Hello, it's been a little over a year now that I've been learning citect scada alone in version 7.2, I know how to make pages, synoptics, create variables, a little cicode, vba, a lot of little things but there I'm stuck on one thing.
By resuming the program to send a mail in vba of Kelian posted in 2016, I cannot find how to recover the cicode variables to transfer them to the vba, I manage to run the program if I declare all the variables inside but if I declare on the cicode side that var_ci = var_vb; it does not work!! however the documentation says "Accessing Cicode Tags with CitectVBA" I am lost and my head explodes! yet this tool is powerful and i'm sure we can read the tags from both sides, should i create a new vba I / O device? Can you help me with some models please? thank you so much.
  Reply With Quote
Old June 14th, 2021, 07:22 AM   #2
Laurent_59550
Member
France

Laurent_59550 is offline
 
Join Date: Jun 2021
Location: Maroilles
Posts: 4
Good morning all,

Does anyone have an answer to my problem? I've been looking for two weeks and can't find! there must be a way to use the variables declared in citect, in my project, what i want is to use an email address from a microsoft forms 2.0 textbox for the vba program (send emails), it would not make sense if we had to declare everything in the vba program because the more the choice of several recipients for example or of subjects, a little helping hand would be cool! thank you very much.
  Reply With Quote
Old June 14th, 2021, 04:02 PM   #3
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,629
Look this


https://johnwiltshire.com/citect-hel...CitectVBA.html


You can read and write directly to tags form VBA and Cicode.
Create some variables, which transfers data between VBA and Cicode.


(Read tag from VBA and Write from Cicode)
(Write to tag from VBA and Read from Cicode)
(is timing critical?)






It is also possibly to call from cicode, but then you have to syntax it this way


https://johnwiltshire.com/citect-hel...om_Cicode.html




Haven't used these thought, only cicode years ago and only little bit.
  Reply With Quote
Old June 14th, 2021, 04:20 PM   #4
Lare
Member
Finland

Lare is offline
 
Join Date: Jan 2006
Location: Finland
Posts: 1,629
This is calling cicode functions from VBA:
https://johnwiltshire.com/citect-hel...CitectVBA.html
  Reply With Quote
Old June 15th, 2021, 08:28 AM   #5
Laurent_59550
Member
France

Laurent_59550 is offline
 
Join Date: Jun 2021
Location: Maroilles
Posts: 4
Problem solved

Good morning all,

First of all, thank you for your help.

I finally found where my problem came from, I had to write my variable as "VB_Test" as explained in the manual but this was not very clear, by doing this, I can manipulate my variable as I want and call it with vbcall or even with a button with the declaration in first position "CIVBA" then "my function" in second position, see you soon for new questions!

Have a good day.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Send email from stock MicroLogix 1100 on bit state? TimD LIVE PLC Questions And Answers 10 January 6th, 2014 06:51 PM
Setting up 1756ENBT to send email ldrewes LIVE PLC Questions And Answers 2 September 23rd, 2009 02:18 PM
AB 1761-NET-ENI won't send email with dialup tonycic LIVE PLC Questions And Answers 6 May 25th, 2007 10:26 PM
send email through GSM modem jim5 LIVE PLC Questions And Answers 3 July 28th, 2006 12:35 PM
CP343-1 IT doesnīt send email MiniMerv LIVE PLC Questions And Answers 1 January 24th, 2004 11:06 AM


All times are GMT -4. The time now is 01:44 AM.


.