This article applies to:
NOTE: The Port Device was introduced into E-Prime 1.x as a method of sending and receiving signals from external devices. Sending and receiving signals from and external device in E-Prime 2.0 / 3.0 has been made easier with the addition of the Parallel, Serial, and Socket device. Because of this, we do not recommend the Port Device in any version of E-Prime beyond E-Prime 1.x.
The Port Device is capable of communicating with any programmable port. It can be added to any experiment via the Experiment Object. Once the Port Device has been added in the Experiment Object, it must be configured properly (see image below). Then, it can be added in the property pages of an object that collects input.
The address of a port can be found by navigating to the Device Manager in the Windows Control Panel. In Device Manager, the Ports (COM and LPT) node shows the Port information. To find the Port address, select the Port, click the Properties button, and select the Resources tab. The address of the currently accessible port will be shown.
NOTE: In order to designate an input address you must add "1" to the output address, so that if your port address, in hexadecimal notation is 378, you would enter "379" in the Port Devices "address" field.
The mask value is set by default to -1, which has no effect on bits.
To use the Port Device in the Property Pages, perform the following:
- Click on the Duration/Input tab.
- Click "Add".
- Select the Port Device.
- Set the input properties for the Port Device.
The Allowable Input for the Port Device is expressed as individual characters representing a bit position (1-8, for 8-bit port setting). The bit pattern, therefore, corresponds to the pin connections. Bits are either 0-based or 1-based. Pins are always 1-based. In most cases, "any" can be entered in the Allowable Input field for the input object to change and trigger E-Prime with any bit.
The CorrectInput is a single bit which identifies which bit position is expected to change on this input. When reading through the port, only 5 bits can be changed with input. Bits 1-3 are always indeterminate; bits 4-8 can be changed. Therefore, the input would generally be a number or numbers from 4-8, if the "any" setting was not appropriate.
Identification of bits is solely the user's responsibility. Please refer to documentation for your hardware and/or port address for a mapping of bits to pins.
Once the Port Device is added, configured, and enabled as an Input Device, E-Prime can read input through the Port without the need for any complicated E-Basic script.
Legacy End User Comments
|ya, thanks for your valuable information. its really great and much useful to us. we had a good solution from you. we will be always thankful to you.|
Please sign in to leave a comment.