*NOTE: This 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 has been made easier with the addition of the Parallel, Serial and Socket device. This is why using the Port Device is not recommended in any version of E-Prime beyond E-Prime 1.x.
The Port Device is capable of communicating with any programmable port.
The Port Device is activated via the Experiment Object and in the property pages of the object that collects input. Once the Port Device has been added in the Experiment Object, you must configure it to your port settings (port address, bits).
The address of your port can be found by selecting "System" from the Windows Control Panel, clicking on the Device Manager tab, and navigating to Ports. Select the parallel (LPT or printer) port, click the Properties button, and select the Resources tab. The address of the currently accessible port will be shown.
*Please 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, you must do the following:
1. Click on the Duration/Input tab
2. Click "Add"
3. Select the Port Device
4. Set 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, if you are simply looking for any bit to change and trigger E-Prime, you may enter "any" in the Allowable Input field for the input object.
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, your 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 you have added, configured, and enable the Port Device 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.|