Pl7 Pro 5.5 et configuration matérielle

Forum traitant des automates industriels de marque Schneider - Telemecanique
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

Bonjour,

je cherche à faire un inventaire du parc schneider de mon entreprise. Essentiellement des Premium.

Il a t il possibilité d' imprimer depuis la configuration matérielle, la configuration complète de mon automate??? modèle de cpu rack et le reste...

Merci par avance.

bye
Avatar du membre
itasoft
Mi homme - Mi automate
Mi homme - Mi automate
Messages : 7807
Enregistré le : 20 oct. 2015, 10:15
Localisation : Lyon
Contact :

Re: Pl7 Pro 5.5 et configuration matérielle

Message par itasoft »

slts,
Dans STATION clic droit faire exporter/importer FNES / Exporter FNE
Et passer le fichier *.fne exporté à la moulinette ci dessous .
Procédure :
Copier les lignes du script ci dessous et les coller dans le « Bloc notes » enregistrer sous ExtraitMatos.vbs
Avec l’explorateur de fichiers cliquer sur ExtraitMatos.vbs pour lancer la moulinette et ouvrir le fichier *.fne
Résultat dans fichier *.txt
---------------------------------------

Option explicit
Dim TXT, sREF, sDESI
Dim fileNameSource, fileNameCible
Dim X1, X2,X1m
Dim FSO,Rtxt,Wtxt
Dim yaBon
fileNameSource=GetFileNameDlg()
fileNameSource = Ucase(Replace(fileNameSource, vbcrlf, ""))
if InStr(fileNameSource,".FNE")=0 then
MsgBox("Extension fichier Source non valide .FNE")
WScript.Quit 0
end if
'Fichier avec la liste du materiel
fileNameCible = Replace(fileNameSource, ".FNE", ".TXT")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Rtxt = FSO.OpenTextFile(fileNameSource)
Set Wtxt = FSO.createTextFile(fileNameCible,true)
Do While Not Rtxt.AtEndOfStream
TXT = Rtxt.Readline
yaBon=InStr(TXT, "RACK") or yaBon
X1 = InStr(TXT, "REFERENC ")
If X1 > 0 Then
sREF = replace(Mid(TXT, X1+9)," ","")
End If
X2 = InStr(TXT, "DESIGNAT ")
If X2 > 0 Then
sDESI = Mid(TXT, X2+9)
End If
If X1m > 0 And X2 > 0 and yaBon Then
Wtxt.writeline (sREF & vbTab & sDESI)
End If
X1m=X1
Loop
Rtxt.Close
Wtxt.Close
Set FSO = Nothing
Set Rtxt = Nothing
Set Wtxt = Nothing
MsgBox "Fin des opérations" , vbInformation, fileNameCible
Function GetFileNameDlg()
GetFileNameDlg=CreateObject("WScript.Shell").Exec("mshta.exe ""about:<input type=file id=f><script language=""VBScript"">f.click():CreateObject(""Scripting.FileSystemObject"").GetStandardStream(1).WriteLine(f.value):close()</script>""").StdOut.ReadAll
End Function
Automaticien privé (de tout)
itasoft@free.fr
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Re: Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

Déjà, merci pour le coup de main.
Par contre quand je fait de l'export ça me propose uniquement .FEF et non FEN.... et ça ne fonctionne pas....
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Re: Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

du coup j ai remplacer :
Option explicit
Dim TXT, sREF, sDESI
Dim fileNameSource, fileNameCible
Dim X1, X2,X1m
Dim FSO,Rtxt,Wtxt
Dim yaBon
fileNameSource=GetFileNameDlg()
fileNameSource = Ucase(Replace(fileNameSource, vbcrlf, ""))
if InStr(fileNameSource,".FEF")=0 then
MsgBox("Extension fichier Source non valide .FEF")
WScript.Quit 0
end if
'Fichier avec la liste du materiel
fileNameCible = Replace(fileNameSource, ".FEF", ".TXT")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Rtxt = FSO.OpenTextFile(fileNameSource)
Set Wtxt = FSO.createTextFile(fileNameCible,true)
Do While Not Rtxt.AtEndOfStream
TXT = Rtxt.Readline
yaBon=InStr(TXT, "RACK") or yaBon
X1 = InStr(TXT, "REFERENC ")
If X1 > 0 Then
sREF = replace(Mid(TXT, X1+9)," ","")
End If
X2 = InStr(TXT, "DESIGNAT ")
If X2 > 0 Then
sDESI = Mid(TXT, X2+9)
End If
If X1m > 0 And X2 > 0 and yaBon Then
Wtxt.writeline (sREF & vbTab & sDESI)
End If
X1m=X1
Loop
Rtxt.Close
Wtxt.Close
Set FSO = Nothing
Set Rtxt = Nothing
Set Wtxt = Nothing
MsgBox "Fin des opérations" , vbInformation, fileNameCible
Function GetFileNameDlg()
GetFileNameDlg=CreateObject("WScript.Shell").Exec("mshta.exe ""about:<input type=file id=f><script language=""VBScript"">f.click():CreateObject(""Scripting.FileSystemObject"").GetStandardStream(1).WriteLine(f.value):close()</script>""").StdOut.ReadAll
End Function

Et ça me sort un fichier txt vide
Avatar du membre
itasoft
Mi homme - Mi automate
Mi homme - Mi automate
Messages : 7807
Enregistré le : 20 oct. 2015, 10:15
Localisation : Lyon
Contact :

Re: Pl7 Pro 5.5 et configuration matérielle

Message par itasoft »

slts
il faut pas exporter l'application mais faire et rien modifier dans le script, tu sais pas lire ?

Dans STATION tout en haut de la liste clic droit faire exporter/importer FNES / Exporter FNE
Automaticien privé (de tout)
itasoft@free.fr
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Re: Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

je dois mal comprendre. regarde mes photos
1.JPG
1.JPG (27.11 Kio) Vu 3561 fois
2.JPG
1.JPG
1.JPG (27.11 Kio) Vu 3561 fois
Avatar du membre
itasoft
Mi homme - Mi automate
Mi homme - Mi automate
Messages : 7807
Enregistré le : 20 oct. 2015, 10:15
Localisation : Lyon
Contact :

Re: Pl7 Pro 5.5 et configuration matérielle

Message par itasoft »

_______________Capture.JPG
Automaticien privé (de tout)
itasoft@free.fr
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Re: Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

je comprend mieux ce que tu di
1.JPG
1.JPG (27.11 Kio) Vu 3560 fois
t mais tu vois bien que je n'ai pas le même onglet
Avatar du membre
lolodu013
Codeur fou
Codeur fou
Messages : 261
Enregistré le : 05 mars 2016, 08:31

Re: Pl7 Pro 5.5 et configuration matérielle

Message par lolodu013 »

arfffff j ai le V4.5 pas le 5.5
Avatar du membre
itasoft
Mi homme - Mi automate
Mi homme - Mi automate
Messages : 7807
Enregistré le : 20 oct. 2015, 10:15
Localisation : Lyon
Contact :

Re: Pl7 Pro 5.5 et configuration matérielle

Message par itasoft »

________IP.JPG
Automaticien privé (de tout)
itasoft@free.fr
Répondre