what library does LED belong to in Pspice? - led

I am a student and new to Pspice, I am given the following example circuit
and asked to created the following circuit,
which I have this
I think I have my circuit designed correctly. However, I am having trouble with finding the correct diode. I have tried different library such as diode, ediode, diode_bridge, on_diode and infineon, but the diodes from these library don't give a current of 20mA(typically lower than that). I also tried to find discrete.olb, however it's not in my capture library.... Is there any other library contains the 2legs led like the diodes in example circuit?I think the reason why I am not getting 20mA is because of the diode?

As can be seen here on the PSPICE website, you should be able to find all of the LED models in the Optoelectronics->LEDs library.

Related

Question about relationship between wb_motor_set_position and wb_robot_step

I'm really new to Webots and a novice at programming. I'm currently trying to drive a robot with rotational motors along a known path using a controller in C language. I'm mainly using the wb_motor_set_position function. However, the amount the robot actually travels in the simulation seems to depend on the position I set in this function, as well as the time step. I am currently running a while loop, setting wb_robot_step(TIME_STEP) and then using wb_motor_set_position. I've been reading the documentation on these, but it still doesn't seem to click to me. Does anyone know how these two functions are dependent/related to each other and how I could maybe determine the distance the robot would go with these (without using a position sensor first) - instead of my current just plug and chug method...? Thank you!

STM32 Artificial Intelligence

I'm working on STM32l476g-DISCO and I want to try the Artifical intelligence feature using STM32 CUBEMX but I couldn't see the output (prediction/decision) neither understand the validation (validation on desktop and validation on target)
I was following the ST Microelectronics Demo: https://www.youtube.com/watch?v=szMGedsp9jc&t=314s
Can someone please explain the results of the output of the validation on desktop and the validation on the target, and how can I see the decision output?
If I enter a custom data of someone 'sitting' for example how can I see if my model is working perfectly on the STM32?
I think you are asking two questions.
1) For the validation, I think that it basically means that it shows how different are the results in the original NN (done in python and with Keras) and the results in the converted C++ network (implemented in your desktop and in the microprocessor)
2) If you want to see the network in action and predicting something I recommend the following example:
Hand written digits recognition on STM32F4
In the code you can see the original NN in python and then the implementation of it in C to be used to recognize digits.
Take special attention to the function MX_X_CUBE_AI_Process(in_data,out_data,1); which is where the prediction occurs.
in addition to what kansaiTobot has said,
from CubeMX-AI you have three modes of operation
1- Validation ==> compare the result of model implemented in Python against the C/C++ model , this mode has two options you can do validaion of C/C++ on Host PC and you can do it on target micro-Controller
2- System Performance ==> measure the required CPU load and memory usage for the NN
3- Application template ==> here you can supply your input data and get the result from the neural network
you can find more information in the user manual AI on STM32
"Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI)"

Translate into Apple Events AppleScript

I have an very simple applescript:
tell application "Opera"
get URL of active tab of window 1
end tell
I want to see Apple Events underlying. So I have launched it with these two environment variables enabled:
export AEDebugSends=1;
export AEDebugReceives=1
Now I am getting this output:
osascript browser.scpt
{core,getd target='psn '[Opera] {----={form=prop,want=prop,seld=URL ,from={form=prop,want=prop,seld=acTa,from={form=indx,want=cwin,seld=1,from=NULL-impl}}}} attr:{csig=65536 returnID=15130}
I would expect to see calls to functions defined here: https://developer.apple.com/documentation/coreservices/apple_events?language=objc
My final goal is to translate that Applescript into c or Obj-C code.
Could someone help me to understand the meaning of the output?
Thanks in advance
would expect to see calls to functions defined here
Well, stop expecting that. What you have is the Apple event itself, expressed in AEPrint notation, as explained here:
https://developer.apple.com/library/archive/technotes/tn/tn2045.html
You can use that to construct the same Apple event, or you can form it in pieces using higher level commands. But either way, it is not up to the system to write your code for you! That is the Apple event, built for you by AppleScript. Learning to read AEPrint notation, learning the structure of an Apple event, learning to build the same Apple event by hand, is all something you must do yourself.
Just to give an example of the reasoning you will use:
Your Apple event starts with the verb coregetd. That is the Apple event equivalent of get (the first word in your AppleScript), as you learn from looking in the application's SDEF dictionary.
OK, now we know the verb; what's the direct object? It's an URLĀ  (note the space, these are four-letter codes); that is the Apple event equivalent of your URL (again, we learn this through the dictionary).
OK, but what URL? It's the URL of the acTa, which is the active tab (again, the dictionary shows us this equivalence).
OK, but the acTa of what? ...
And so on. Once you have broken down the Apple event into properties and elements and objects specifiers in this way, you can build it up again through Carbon or Cocoa commands.
You have chosen, for reasons that escape me, to embark on a very long journey. You have elected to throw away the simplicity of AppleScript notation and construct an Apple event yourself. You have chosen a long road involving much learning. There is no shortcut; the runtime is not going to write your code for you. The longest journey begins with the first step. Begin!

What is the correct place to list and examine ports in erl_driver

In the tutorial for erl_driver there seems to be no indication to where does the first ErlDrvPort object comes from. Say I want to wrap libusb-1.0 to use it from erlang. There is no place in the API described by ErlDrvEntry for any index methods. How does one find a port to open?
Normally you obtain the first port using the erlang:open_port/2 function, usage of which is shown in the code example in section 6.2 of the tutorial you linked to in your question.
Instead of using Ports to wrap a C library, you can also use NIFs. With Nifty there exists even a wrapper generator that does most of the work for you.

Labjack Humidity Probe Example

I realize this might be a long shot, but does anyone have an example of using the EI-1050 probe with a Labjack controller in something C-related? I'm currently using a Labjack U12 if it matters.
It installed 2 examples, ljsht and ljsht-multi, that seem to be doing something related to it, but I can't find the source code.
Thank you for your time.
The applications you mentioned are written in LabVIEW, and the source code is available. Use LJSHT.exe to make sure your EI-1050 is connected right and giving good readings.
Refer to the EI-1050 datasheet for information about interfacing with the U12.
Then start with a basic C example like "VC6 Simple Example" or "U12 Dev-C++ Example":
http://labjack.com/support/u12/examples
... and add a call to the function SHT1X() described in Section 4.31 of the U12 User's Guide.

Resources