About new scada basic instruction FCOPY / FMOVE

6 Posts
3 Users
0 Likes
49 Views
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi

Did someone test this instruction to copy a file from a PC to another PC, is it ok or using robocopy is still needed to do that ?

Thanks

Nico

 
Posted : 24/08/2016 12:00 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hi Nico,

Yes we used already to copy from PC to PC and it is working. No need using Robocopy anymore.

Nico

 
Posted : 31/08/2016 4:47 pm
(@m-nauarcinfo-com)
Posts: 49
Trusted Member
 

Hi Nico,
it would be great to update KB209 & KB655.
I need to help a customer to broadcast user.dat to all machines when he changed it (mainly passwords)
In the help of PcVue 12.0 we have this Scada Basic example :
----------------------------
DIM fbuf1 as long; 'handle of the bufffer returned by FSTAT
DIM user1 as str; 'location of the file user.dat
DIM date as STR; 'Modification date of the file

CONST TAILLE = 0; 'offset for the file size
CONST MODIF = 4; 'offset for the file date
CONST ALLOC = 64; '22 is the minimum buffer size

sub main()
user1= "..\CTEMP\user.dat";
fbuf1 = ALLOC_BUFFER (ALLOC);
FSTAT(user1,fbuf1);
date = CGET_BUFFER(fbuf1,MODIF,20);
CYCLIC("ADDPROG",5,"DIFFUSION","","lastmodif");
end sub

sub lastmodif()
dim date_modif as STR;
FSTAT(user1,fbuf1);
date_modif = CGET_BUFFER(fbuf1,MODIF,20);
IF (CMPSTRING(date,date_modif) 0) THEN
diff();
END IF
date = date_modif;
end sub

sub diff()
'This function has to be completed by launching a batch file to copy user.dat file to other stations
print("Distribution of user.dat on all stations (directory C and CTEMP)");
end sub
----------------------------------

The fact is there is nothing to help the pcvue user / developer to broadcast the file....
I will try wiht FCOPY :unsure:
It will be great to have it inside PcVue, without coding anything... 🙂
Manu

 
Posted : 12/02/2020 11:17 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

it would be great to update KB209 & KB655.

@Gilles: This one is for you

@Manu: The Scada Basic must be updated in the help. Please create a SPR?

It will be great to have it inside PcVue, without coding anything.

It's in the Pipe..

Nico

 
Posted : 13/02/2020 5:51 pm
(@m-nauarcinfo-com)
Posts: 49
Trusted Member
 

Hi Nico,

I can't, I have no access :whistle:

 
Posted : 17/02/2020 9:31 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Seriously?
Ok I will ask for your integration ....

 
Posted : 18/02/2020 9:12 am