Big lamp
Quote from LWT98709 on December 1, 2024, 5:50 am"Big lamp": lamp that changes color depending on the current intensity.
Dimensions: 8 x 8.
Operation: "scripted". The script measures the voltage at the pins and calculates the current intensity. Depending on the current, the color changes from black to yellow. If the intensity exceeds the maximum current, the lamp turns red.
The lamp subcircuit is contained in the "data" subdirectory. The subcircuit itself uses a scripted "filament" circuit in a 2nd level "data" subdirectory. The "filament" circuit which is linked to the lamp drawing to control the color, and to a resistor through which the current passes.
The parameters must be set within the "filament-1" component.Works with version 1.1.0-SR1-R2011
"Big lamp": lamp that changes color depending on the current intensity.
Dimensions: 8 x 8.
Operation: "scripted". The script measures the voltage at the pins and calculates the current intensity. Depending on the current, the color changes from black to yellow. If the intensity exceeds the maximum current, the lamp turns red.
The lamp subcircuit is contained in the "data" subdirectory. The subcircuit itself uses a scripted "filament" circuit in a 2nd level "data" subdirectory. The "filament" circuit which is linked to the lamp drawing to control the color, and to a resistor through which the current passes.
The parameters must be set within the "filament-1" component.
Works with version 1.1.0-SR1-R2011
Uploaded files:Quote from LWT98709 on December 1, 2024, 3:50 pmYou can leave the model in the sub folder "data" aside the simulation file. Your project will be portable. But, have to edit your .sim1 as a text file to include the model, or make a copy / paste from an existing simulation file.
Or you can add it to your SimulIDE folder. Have to edit your .xml file.
You can leave the model in the sub folder "data" aside the simulation file. Your project will be portable. But, have to edit your .sim1 as a text file to include the model, or make a copy / paste from an existing simulation file.
Or you can add it to your SimulIDE folder. Have to edit your .xml file.
Quote from Alex68 on December 1, 2024, 4:08 pmIt would be easier for me if you show on the screens how this model is installed and where. The whole installation process.
Thank YOU!
It would be easier for me if you show on the screens how this model is installed and where. The whole installation process.
Thank YOU!
Quote from LWT98709 on December 1, 2024, 4:33 pmI am not a specialist in using libraries in SimulIDE. I learned using information I could find here and there. In addition, I am not an English speaker.
For this project, I imitated deFran's projects.
With deFran's other projects, the models are placed in a "data" subdirectory relative to the simulation file. The models in "data" can in turn use other models always in relative "data" subdirectories.The problem with this operation is that the models are not visible from the menu. It is necessary to edit the simulation file as a text file to add the new model. You must add an <item> tag with the CircId value starting with the model name (example: CircId="LAMP-1").
If you want to avoid editing the simulation file as a text file, you can copy and paste from a file that already has the model.
I am not a specialist in using libraries in SimulIDE. I learned using information I could find here and there. In addition, I am not an English speaker.
For this project, I imitated deFran's projects.
With deFran's other projects, the models are placed in a "data" subdirectory relative to the simulation file. The models in "data" can in turn use other models always in relative "data" subdirectories.
The problem with this operation is that the models are not visible from the menu. It is necessary to edit the simulation file as a text file to add the new model. You must add an <item> tag with the CircId value starting with the model name (example: CircId="LAMP-1").
If you want to avoid editing the simulation file as a text file, you can copy and paste from a file that already has the model.
Quote from Alex68 on December 1, 2024, 4:51 pmThank you very much! I will try to install it. I have long dreamed of such a heater with a color change depending on the voltage on it. The Proteus program has this model.
Thank you very much! I will try to install it. I have long dreamed of such a heater with a color change depending on the voltage on it. The Proteus program has this model.
Quote from LWT98709 on December 1, 2024, 4:55 pmIf you absolutely want the model to appear in the SimulIDE menu. You have to follow the procedure of one of arcachofo's videos (I don't have the link ...).
The principle is to copy the "LAMP" folder (or the "data/LAMP" folder in my zip file) to the "SimulIDE/data/custom/LAMP" directory (assuming that "SimulIDE" is your SimulIDE software installation directory). Then, edit the "SimulIDE/data/custom.xml" file and add in the "custom" category, type "Subcircuit".I understand that it is complicated. The software is still in development. The "user friendly" model addition features are not yet implemented. If you want to exploit the enormous potential of the software, you need a little manipulation.
If you absolutely want the model to appear in the SimulIDE menu. You have to follow the procedure of one of arcachofo's videos (I don't have the link ...).
The principle is to copy the "LAMP" folder (or the "data/LAMP" folder in my zip file) to the "SimulIDE/data/custom/LAMP" directory (assuming that "SimulIDE" is your SimulIDE software installation directory). Then, edit the "SimulIDE/data/custom.xml" file and add in the "custom" category, type "Subcircuit".
I understand that it is complicated. The software is still in development. The "user friendly" model addition features are not yet implemented. If you want to exploit the enormous potential of the software, you need a little manipulation.
Quote from Alex68 on December 1, 2024, 5:57 pmСпасибо. Я тоже на англ. не общаюсь. Только через переводчик. Но иногда он такое переводит что сам потом не разгребешь.
Вообще я модели добавлял от своего друга. Работают. Я просто вставил в папку Дата вашу папку с этой лампой. Открыл файл с лампой и источником питания. Вообщем лампа работает на напряжение - меняет цвет. Но зависает конечно.
Вообщем завтра сделаю как вы написали выше.
Спасибо.
Спасибо. Я тоже на англ. не общаюсь. Только через переводчик. Но иногда он такое переводит что сам потом не разгребешь.
Вообще я модели добавлял от своего друга. Работают. Я просто вставил в папку Дата вашу папку с этой лампой. Открыл файл с лампой и источником питания. Вообщем лампа работает на напряжение - меняет цвет. Но зависает конечно.
Вообщем завтра сделаю как вы написали выше.
Спасибо.
Quote from LWT98709 on December 1, 2024, 11:59 pmYes, it freeze, especially when you move rapidly the dial of the voltage generator.
I don't know why ...
Yes, it freeze, especially when you move rapidly the dial of the voltage generator.
I don't know why ...
Quote from LWT98709 on December 2, 2024, 12:39 amBug report :
It seems that the function component.setPropStr() makes the simulator freeze.
If you comment the line component.setPropStr() in voltageChange() in the script "filament.as". The simulation does not freeze.
But when you uncomment the line component.setPropStr(). The simulation freeze after some time. The script seems to continue to run, the print() command still display things in the console.
It seems that setPropStr() freeze only with "Color" property, not with "H_size" or "V_size". The script can change the size of the drawing component (ellipse, rectangle) without freezing, but not the color.
Bug report :
It seems that the function component.setPropStr() makes the simulator freeze.
If you comment the line component.setPropStr() in voltageChange() in the script "filament.as". The simulation does not freeze.
But when you uncomment the line component.setPropStr(). The simulation freeze after some time. The script seems to continue to run, the print() command still display things in the console.
It seems that setPropStr() freeze only with "Color" property, not with "H_size" or "V_size". The script can change the size of the drawing component (ellipse, rectangle) without freezing, but not the color.
Uploaded files: