Citect Modbus time interval reading

captain_is

Member
Join Date
Mar 2009
Location
Romania
Posts
57
Hy,

I configured a Citect application that reads data from an energy meter...now i need to add to the application a time limitting reading interval...wich needs to ne configured by the user...

EX: i need to read current measurements at every 5 minutes.

I have a variable tag array that stores this data : Current[16]...something like that...but i need to control the modbus to read at a givin` time interval..

Does anyone dealt with this kind of problems before?

Thanks in advance!
 
There are numerous ways to do this, a few pointers:

- Use scheduled communications, i wouldnt do it this way but its an option

- Write some Cicode to run every 5 minutes from the Citect event system to populate your array

- Use the Citect trend sysyem to log the values, its what it was designed for

Info on all these options can be found in the very good Citect help system.

Also I strongly suggest that you get yourself on a Citect training course before you design yourself into a corner.

Good luck......
 
Last edited:
I thought about a CiCode function that will run every 5 minutes, but i don't know how to do this for modbus driver...i mean...when i run the application ...communication with the device is starting and my variable tag arrays populates...i need a function or something to control the modbus driver to run at a given interval for a particular device...
 
About the training you suggested...believe me..if i'd could i'd go...but where i am is difficult to do that...and is also very expensive..I just finished my studies this year, and i got employed for 2 months now...you wouldn't believe if a tell you how this job is paid here in Romania...So it's a little bit difficult with the trainigs..maybe in the future...i hope..

Thanks about your advices...now i'm trying to do it with schedule communication..because it's more appropriate to what i need..

i need to read values from 6 energy meters on a RS-485 network, and if i read all the time from all devices ..the computer running citect will crash...so i need to schedule those readings..
 
You dont want to stop the device reading or control the modbus driver, leave it online and connected,

You just need to control when the array is filled using the event system and your cicode function or use the trend system.

To be brutally honest if you are struggling with getting your head around how to do this then its going to take a step by step tuition to do it, i am afraid i havent got time for that.

Like i said, read the help and get enrolled on a Citect course.

If you get to a point where you have the code written and its just a matter of help debugging it then come back and ask specific questions.
 
I didn't ask for a step by step tuition..thank you but i don't need that..
I tried with schedule communications, and it's almost ok because it doesn't read all the values...
When i told about an array, i referred to a variable tag modbus array...with the address 40045[16] for example...and i don't know how to control when Citect reads these values from the energy meter...because if i leave the communication online and connected as you said this variable tag array will update each time Citect reads a response from the energy meter..this means mSeconds..and if i have 6 energy meters and i read from all at once Citect crashes...
From Cicode i can control this only by using IODeviceControl() function, but in this case i cannot display the last values that were read..

And if i see that you keep telling me about a Citect course, i will tell you that this is not possible for now, because there is only one Citect course per year ..and that is Basics of Citect and they are learning you how to draw objects, configure an IODev, etc...i did that already and some other complete and running applications but i never encountered this problem...i comunicated only with standard equipment and only with PLCs..and altough i don't force anyone to respond...if you want to it's ok..if not..it's also ok..

Thanks again for you tips..
Good luck..
 
and if i have 6 energy meters and i read from all at once Citect crashes.....

OK, i apologise if i upset you, you are correct you didn't force anybody to respond but you did post a question on the internet, on a public forum. That in itself invites an answer and if you can't take a bit of advice from a fellow engineer who uses Citec on a daily basis then perhaps you should think twice about posting next time ?

That said, if you are thinking you control how a tag array fills or when you read a tag by using IODeviceControl you are very much mistaken.

Whatever you are doing you are doing it wrong if you have 6 meters online and Citect crashes, Citect will handle communication to hundreds of devices and 10's of thousands of tags without even looking like its going to crash.

I think you need to go back to the beginning, ask youself what you are trying to achieve and why, then start again step by step.

Look at the sample projects that came with Citect to get some ideas of how it communicates with devices and how it logs and displays data.
 
You missed understood me...i respect you because of your knowledge and all that...maybe i say stupid thinks...because i don't even have two entire months working with Citect, and what i learned...i learned by myself...i studied the example project every time i needed something that i believed i can find in the example project..

To explain better... i configured a citect project that reads values over RS-485 using Modbus protocol...for this...i configured the variable tags as this :
Name : Voltage_Readings Type:INT Address:400001[16]
and when i run the project this array of variables get populated with register values stored in the meter.

Now all it's ok... Then..My boss gave me this task...to configure the project to read the values on a given time interval and no to update these values continuously because he said that Citect will crash if i will have more meter on the line...now ..what i'm supposed to do... as i said..i just finished my education..and i need the experience and also i want to learn.. but i cannot do this without a job...so...i need to do my tasks..even if maybe you are right and Citect will not crash even with hundred's of meters i still need to do it...

Believe if i had the posibility to go to a Citect training i have had followed it..but unfortunately i need to learn from myself...and the only experienced people in this kind of problems i know is you and other "fellow" engineers who wants to help...

Believe me that i don't post questions until i don't try all the solutions i can think for myself...
 
Now all it's ok... Then..My boss gave me this task...to configure the project to read the values on a given time interval and no to update these values continuously because he said that Citect will crash if i will have more meter on the line...now ..what i'm supposed to do...

How about telling your boss he has no idea what he is talking about ?

Your tags should be addressed as individual tags, there is no need for them to be in an array, it makes things more complicated whan you want to use the tags in code or on the page.

There is really only one way of doing what you are asking, if you really want to do it look at scheduled communications, its designed to connect to a device on a schedule and retrieve information for a set period of time.
 
I configured like this...with arrays..because i cannot read the values otherwise...for ex... the measurements for voltage are in registers:
&0000
&0004
&0008
&000C
if i don't have tags for all the values...&0000 - &000C ..12 tags then the citect cannot read the data...that's why i used variable tag arrays..cause it's easiear then to configure 50 tags..
and i take from that array the values i neeed...ex: System Curent : Curent[3]..etc...

i tried to use schedule comunication...but it leaves me with unread data...there are register wich remain with #WAIT value in the grahic page..

Thanks!..
 
There is really only one way of doing what you are asking, if you really want to do it look at scheduled communications, its designed to connect to a device on a schedule and retrieve information for a set period of time.

And do you know how can i modify that period of time when citect connects to the IODev and reads, because i think this time is short and it doesn't read all tags..even if in the Citect manual on schedule communications it says that Citect will connect to the IODev at a given schedule and disconnect after reading all tags...in reality this doesn't happen...it doesn't read all tags..

Thanks
 
And do you know how can i modify that period of time when citect connects to the IODev and reads, because i think this time is short and it doesn't read all tags..even if in the Citect manual on schedule communications it says that Citect will connect to the IODev at a given schedule and disconnect after reading all tags...in reality this doesn't happen...it doesn't read all tags..

Thanks

Sounds like the sort of thing that a college would have you doing, is this a real world application or a project ? If it is a real world application i hope your customer is very understanding, it wouldnt get past me if i was buying it....

Also you have ignored my comments about using the trend system to log the tag every 5 minutes, have youe even considered this ?

I dont use Scheduled communications, we let all 500+ devices connect and leave them connected, thats what a SCADA system is for.

Looking at the IODevices form you can specify a schedule for connection and a connected time, also a connect action and disconnet action, you should be able to do everything you need with that.
 
I don't know what it is...i have the meter...Citect...and a list of tasks to do...i believe that is a kind of preparation for incoming project...i don't know...

I didn't ignored your comments about trend system..i can use that to retrieve values from the variable tag database at every givin intervals...i know that...if i log succeed in loggin` my variables corectly then i also need to do some trend graphs..but that isn't the problem now.

But for now i don't need that...i need to update my variable tag database with values from the meter's register at givin` times...and this i can do with schedule communications as you also said...but i don't know why at connection Citect doesn't read all the values...just couple of them...if i use a non-scheduled device...all the values are read..

that's why i said that maybe the time in wich the Citect stays connected at every time interval is too small and that's why cannot read all registers..
 
OK, i give up then.

You are being asked to engineer a system by your boss, you dont know what it is, what its for or why you are being asked to make Citect do what he wants it to do ! What hope have you got ?

I suggest you pick up the phone and speak to Citect support, thats what they are there for.

Best of luck, i am out......
 
I'm sorry because i imagine that i ****ed you off...that's the situation...i a new employee...whitout experience...and because the training is quite expensive ..they don't afford it...so i need to learn by myself.. i need to accomplish this tasks in order to learn...now i have only 1 meter..and i need to log the data from it as i said..and to understand how it is functioning because after this they have project that involves more meters..

I struggle for nothing anyway...sorry to bother you...thanks for concerning..

Good luck to whatever you are doing..
 

Similar Topics

Hi every one. I have strange problem with Modbus communication in Citect 2018. I am communicating to the site switches through Modbus TCP protocol...
Replies
0
Views
1,079
Hi Guys, I currently have a customer that has their Citect 6.10 SCADA system running on two WindowsXP SP2 PC's. They are connected to 10 remote...
Replies
2
Views
2,030
I was using EM6400 energy meters with Vijeo Citect scada in Modbus RTU network & mapping as following successfully. NAME- KW_SMS_1 TYPE- REAL...
Replies
2
Views
2,467
Hi there, Firstly I no nothing about Quantum PLCs and very little about Citect. I have an old Win NT Citect SCADA system failure which I need to...
Replies
8
Views
2,879
Hi everyone, I'm an engineering fourth grade student and I am to new these topics. I need to communicate between Citect SCADA 2016 and M241 plc...
Replies
2
Views
3,095
Back
Top Bottom